Why proxy is not used to autowire

后端 未结 2 1625
情书的邮戳
情书的邮戳 2021-01-15 03:58

I can not find any reason why every autowired bean are not autowired by proxy. I know that becasue @Transactional annotations do not work and I checked autowire

2条回答
  •  太阳男子
    2021-01-15 04:29

    My guess is that you are scanning for the same components twice. You probably have a in your root context (for the ContextLoaderListener) and one for the DispatcherServlet. NO if the both scan for the same classes you end up with duplicated (and one proxied and one non proxied instance).

提交回复
热议问题