cas-security-spring-boot-starter icon indicating copy to clipboard operation
cas-security-spring-boot-starter copied to clipboard

Use springboot 2.7.0+ with SecurityFilterChain instead of deprecated WebSecurityConfigurerAdapter

Open mmaccari opened this issue 3 years ago • 1 comments

When upgrading my applications to springboot 2.7.0 and using SecurityFilterChain instead of deprecated WebSecurityConfigurerAdapter I get an error message.

Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [javax.servlet.Filter]: Factory method 'springSecurityFilterChain' threw exception; nested exception is java.lang.IllegalStateException: Found WebSecurityConfigurerAdapter as well as SecurityFilterChain. Please select just one. at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185) at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:653) ... 21 common frames omitted Caused by: java.lang.IllegalStateException: Found WebSecurityConfigurerAdapter as well as SecurityFilterChain. Please select just one.

mmaccari avatar Jul 01 '22 11:07 mmaccari

I've started working on subject through https://github.com/kakawait/cas-security-spring-boot-starter/tree/support-spring-boot-2.7

Mostly working, but few breaking changes. Thus I've to do more documentations and migration path

kakawait avatar Oct 17 '22 08:10 kakawait