Get instance of AuthenticationManager Manually

前端 未结 1 1902
庸人自扰
庸人自扰 2021-01-02 11:52

I\'m trying to implement the below, but my authenticationManager instance throws the below exception and is not autowired. How do I get an instance of it from Spring manual

1条回答
  •  没有蜡笔的小新
    2021-01-02 12:21

    First, provide an explicit bean name for your AuthenticationManager

    
       ...
    
    

    Second, use qualifier when auto-wiring:

    @Autowired
    @Qualifier("authenticationManager")
    protected AuthenticationManager authenticationManager;
    

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