<dependencies>
<dependency>
<groupId>com.nepxion</groupId>
<artifactId>matrix-aop-starter</artifactId>
<version>x.x.x</version>
</dependency>
</dependencies>
@Target({ElementType.TYPE, ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
public @interface MyAspect {
}
@Aspect
@Component
public class MyAspectInterceptor {
@Around(value = "@annotation(myAspect)")
public Object intercept(ProceedingJoinPoint joinPoint, MyAspect myAspect) throws Throwable {
// ...
Object result = joinPoint.proceed();
// ...
return result;
}
}
<context:component-scan base-package="com.example.aspect" />
<aop:aspectj-autoproxy proxy-target-class="true" />