@Autowired object gets a null value in one class, while successfully wired in another

前端 未结 5 1653
无人共我
无人共我 2021-02-19 01:23

I am working on a project using Spring 3, and Spring Security. My problem is with IoC container. Problem started when I wrote my own implementation of UserDetailsService

5条回答
  •  栀梦
    栀梦 (楼主)
    2021-02-19 02:08

    This is likely due to SEC-1911 which causes issues when relying on BeanPostProcessors like AutowiredAnnotationBeanPostProcessor and using the element. Try removing and seeing if @Autowired works again. Note that this first issue is a duplicate of SEC-1885, which is where this is fixed but the first issue's symptoms better match up with this issue.

提交回复
热议问题