Skip to content
Advertisement

Field authenticationManager in service.SecurityServiceImpl required a bean of type ‘org.springframework.security.authentication.AuthenticationManager’

I am new to Spring Boot and trying to implement whatever I’ve learned from this link: login-registration-feature. My aim is to build a user login and registration feature but i’m stuck with this error:

JavaScript

My folder structure, code is same as the one mentioned in the link. But couldn’t figure out why @AutoWired is not working. Please help me. Thank you.

Advertisement

Answer

In the configuration class WebSecurityConfig add bean directly:

JavaScript
User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement