出现这个报错通常是因为使用了AopContext.currentProxy()函数却没有添加相应的配置造成的。

通过注解添加配置(加在类上):

@EnableAspectJAutoProxy(proxyTargetClass = true, exposeProxy = true)

或通过xml配置文件添加配置:

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

这样就解决了报错问题。

 

"祝你早安午安晚安。"

相关文章:

  • 2021-08-18
  • 2021-07-08
  • 2022-12-23
  • 2021-07-28
  • 2021-11-07
  • 2022-01-07
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案