Spring Security java.lang.StackOverflowError exception after all providers

前端 未结 2 595
感动是毒
感动是毒 2020-12-16 23:20

Environment:

  • Spring 4.1.6
  • Spring Security 4.0.1

I have 2 authentication providers - one that hits ActiveDirectory, and then one that hi

2条回答
  •  离开以前
    2020-12-16 23:39

    I had the same problem, this was the solution for me:

    @Override
    protected void configure(AuthenticationManagerBuilder
    authManagerBuilder) throws Exception {
    ...
    .userDetailsService(userDetailsService());
    ...
    }
    

    The problem where the brackets after userDetailsService - removed them and it works as expected. From your code snippet I can't be sure where you get the userDetailsService from, for me I had it @Autowired.

提交回复
热议问题