注解切面缺少注解参数

针对注解Retry进行切面处理,报error at –0 formal unbound in pointcut异常。

因为传递给aroundAdvice切面方法缺少注解参数。
例如:

1
2
@Around(value = "point()")
public void aroundAdvice(ProceedingJoinPoint joinPoint, Retry retry) throws Throwable

正确样例

1
2
@Around(value = "point() && @annotation(retry)")
public void aroundAdvice(ProceedingJoinPoint joinPoint, Retry retry) throws Throwable
文章目录
|