在使用@Aspect 注解进行AOP编程时,如果项目中使用到了spring mvc 那么如果你想使用AOP 来拦截controller层的方法时,你的AOP注解需要声明在dispatcher-servlet.xml中
与spring mvc的配置定义在一起!!!
如果修改完后 报如下错误:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping#0'
请将修改为1.8.9版本
或者将spring版本升级到4.3.5以上!!!