Affects: 5.2.12 Cannot execute Aspect function, I guess org.springframework.aop.support.AopUtils line 242
if (!Proxy.isProxyClass(targetClass)) {
classes.add(ClassUtils.getUserClass(targetClass));
}
classes.addAll(ClassUtils.getAllInterfacesForClassAsSet(targetClass));
This order. Unable to trigger ShadowMatch,when I change the order,The condition cannot be met.
org.springframework.aop.aspectj.AspectJExpressionPointcut line 450
if (targetMethod != originalMethod && (shadowMatch == null ||
(shadowMatch.neverMatches() && Proxy.isProxyClass(targetMethod.getDeclaringClass())))) {
public interface ILogController {
@PostMapping
String post();
}
@RestController
public class LogController implements ILogController {
@Override
public String post() {
return "";
}
}
@Slf4j
@Aspect
public class PostMappingLogAspect {
@AfterReturning(value = "@annotation(mapping)", returning = "returnValue")
public void afterReturningTask(JoinPoint point, Object returnValue, PostMapping mapping) {
log.info("enter");
}
}
Comment From: snicoll
I guess org.springframework.aop.support.AopUtils line 242
Unfortunately, that's not really helping. Can you please share a small sample that reproduces the problem you've described? Us moving this code in text to an actual sample may miss a critical detail that you haven't shown.
Comment From: spring-projects-issues
If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.
Comment From: spring-projects-issues
Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue.