spring - forcing cglib proxies for @Autowired fields

后端 未结 1 1532
旧时难觅i
旧时难觅i 2021-02-15 15:44

I have mixed stack: EJB and Spring. For autowiring Spring to EJBs I use SpringBeanAutowiringInterceptor (not sure if that could affect the problem I have).

相关标签:
1条回答
  • 2021-02-15 16:10

    You should not use aop scoped proxies for singletons.

    Use <aop:aspectj-autoproxy proxy-target-class="true" /> or @EnableAspectJAutoProxy(proxyTargetClass=true) in your spring configuration file or class to force cglib proxies.

    0 讨论(0)
提交回复
热议问题