Cannot find current proxy: Set 'exposeProxy' property on Advised to 'true' to make it available.解决

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/u011870280/article/details/84790458

用 AopContext.currentProxy()函数没配置会照成这个问题

可以通过注解:

@EnableAspectJAutoProxy(proxyTargetClass = true, exposeProxy = true)

或配置:

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

解决。

猜你喜欢

转载自blog.csdn.net/u011870280/article/details/84790458
今日推荐