Description
The class org.springframework.security.config.annotation.web.configurationWebSecurityConfiguration declares a springSecurityFilterChain bean. The method first verifies if there exist both securityFilterChains and webSecurityConfigurers. If both exists it throws an IllegalStateException as in the issue title.
I have this same problem, i can't figure out how to have one without the other.
I'm using the keycloak spring boot starter that declares both the abstract class KeycloakWebSecurityConfigurerAdapter(a WebSecurityConfigurer) and the Annotation @KeycloakConfiguration which implicitly imports @EnableWebSecurity. With this constellation, there is no way i can get around the thrown error.
And when i see this example below, i wonder how this works because both a WebSecurityConfigurer is defined and the annotation @EnableWebSecurity is being used.
Can some one please clarify me?