【发布时间】:2018-01-08 10:33:04
【问题描述】:
我正在使用 Spring AOP。这是示例方法:
public String method(List<Integer> ids) {
if(ids == null) return "ERROR";
else return "OK";
}
我的外观是这样的:
@AfterReturning(pointcut = "execution( * com.pack.MyService.method(..))", returning = "result")
public void methodAdvice(JoinPoint joinPoint, String result) {
// My implementation
}
是否可以根据method()的返回值调用aspect方法?提前致谢。
【问题讨论】:
标签: java aop spring-aop pointcut