Hi,
在 Spring 里面看到 AspectJ 相关的描述,请问下大家有在 Project 里面用到 AspectJ 吗?
简单(大概)的应用完整例子是怎么样应用 AspectJ?
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
public @interface Auditable {
AuditCode value();
}
And then the advice that matches the execution of @Auditable methods:
@Before("com.xyz.lib.Pointcuts.anyPublicMethod() && @annotation(auditable)")
public void audit(Auditable auditable) {
AuditCode code = auditable.value();
// ...
}
Thanks.
------解决思路----------------------


大家都在项目中没用过吗???