SSM 使用AOP注解方式,没有生效

首先是确认使用的AOP的代码没有错,然后在你的扫描xml里加上:

<aop:aspectj-autoproxy proxy-target-class="true"/>

因为很多项目都只配置了扫描service,controller这些,所以很容易漏掉开启扫描AOP的配置。

发布了181 篇原创文章 · 获赞 289 · 访问量 27万+

猜你喜欢

转载自blog.csdn.net/qq_35387940/article/details/105482475
今日推荐