Does anyone have an idea why would this code cause...
# spring
p
Does anyone have an idea why would this code cause dependency cycle?
Copy code
@Configuration
@EnableWebSecurity
class WebSecurityConfig(private val authenticationManager: AuthenticationManager) : WebSecurityConfigurerAdapter() {
    // empty
}
Copy code
┌─────┐
|  webSecurityConfig defined in file [C:\Users\...\WebSecurityConfig.class]
↑     ↓
|  authenticationManager defined in class path resource [org/springframework/boot/autoconfigure/security/AuthenticationManagerConfiguration.class]
└─────┘
j
why do you need to inject
AuthenticationManager
into
WebSecurityConfig
?