查看xml中是否缺少
<!-- 指定要扫描的包-->
<context:component-scan base-package="com.spring"/>
<!-- 开启spring对aop注解的支持-->
<aop:aspectj-autoproxy/>
查看xml中是否缺少
<!-- 指定要扫描的包-->
<context:component-scan base-package="com.spring"/>
<!-- 开启spring对aop注解的支持-->
<aop:aspectj-autoproxy/>