Improve deprecation notice in WebSecurityConfigurerAdapter
Closes gh-12260
This commit is contained in:
parent
2d19d972f4
commit
f561d3784e
|
@ -91,7 +91,24 @@ import org.springframework.web.accept.HeaderContentNegotiationStrategy;
|
|||
* @see EnableWebSecurity
|
||||
* @deprecated Use a {@link org.springframework.security.web.SecurityFilterChain} Bean to
|
||||
* configure {@link HttpSecurity} or a {@link WebSecurityCustomizer} Bean to configure
|
||||
* {@link WebSecurity}
|
||||
* {@link WebSecurity}. <pre>
|
||||
* @Bean
|
||||
* public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception {
|
||||
* http
|
||||
* .authorizeHttpRequests((authz) ->
|
||||
* authz.anyRequest().authenticated()
|
||||
* );
|
||||
* // ...
|
||||
* return http.build();
|
||||
* }
|
||||
*
|
||||
* @Bean
|
||||
* public WebSecurityCustomizer webSecurityCustomizer(WebSecurity web) {
|
||||
* return (web) -> web.ignoring().antMatchers("/resources/**");
|
||||
* }
|
||||
* </pre> See the <a href=
|
||||
* "https://spring.io/blog/2022/02/21/spring-security-without-the-websecurityconfigureradapter">Spring
|
||||
* Security without WebSecurityConfigurerAdapter</a> for more details.
|
||||
*/
|
||||
@Order(100)
|
||||
@Deprecated
|
||||
|
|
Loading…
Reference in New Issue