新近搭建了一个spring3的项目,用户注解的方式实现aop ,在spring.xml 添加了
提示错误:Caused by: java.lang.ClassNotFoundException: org.springframework.beans.factory.parsing.ComponentRegistrar
但是spring3 的jar和源代码里面都没有找个接口。求老鸟关怀下 :D
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.stereotype.Component;
@Component
@Aspect
public class CheckLoginAspect {
@Pointcut("execution(* ecif.common.app.*.*(..))")
public void pointcut() {
System.out.println("。。。。之前pointcut");
}
@Before("pointcut()")
public void before() {
System.out.println("。。。。之前");
}
}