WebSecurityConfigurerAdapter has been deprecated in Spring Security 5.7 but the javadoc of EnableWebSecurity still encourages its use:
|
* Add this annotation to an {@code @Configuration} class to have the Spring Security |
|
* configuration defined in any {@link WebSecurityConfigurer} or more likely by extending |
|
* the {@link WebSecurityConfigurerAdapter} base class and overriding individual methods: |
|
* |
|
* <pre class="code"> |
|
* @Configuration |
|
* @EnableWebSecurity |
|
* public class MyWebSecurityConfiguration extends WebSecurityConfigurerAdapter { |
WebSecurityConfigurerAdapterhas been deprecated in Spring Security 5.7 but the javadoc ofEnableWebSecuritystill encourages its use:spring-security/config/src/main/java/org/springframework/security/config/annotation/web/configuration/EnableWebSecurity.java
Lines 31 to 38 in 4caf53e