Skip to content

Commit e774bd4

Browse files
Merge branch '5.7.x' into 5.8.x
Closes gh-12261
2 parents 01117b1 + f561d37 commit e774bd4

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

config/src/main/java/org/springframework/security/config/annotation/web/configuration/WebSecurityConfigurerAdapter.java

+18-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,24 @@
9191
* @see EnableWebSecurity
9292
* @deprecated Use a {@link org.springframework.security.web.SecurityFilterChain} Bean to
9393
* configure {@link HttpSecurity} or a {@link WebSecurityCustomizer} Bean to configure
94-
* {@link WebSecurity}
94+
* {@link WebSecurity}. <pre>
95+
* &#64;Bean
96+
* public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception {
97+
* http
98+
* .authorizeHttpRequests((authz) ->
99+
* authz.anyRequest().authenticated()
100+
* );
101+
* // ...
102+
* return http.build();
103+
* }
104+
*
105+
* &#64;Bean
106+
* public WebSecurityCustomizer webSecurityCustomizer(WebSecurity web) {
107+
* return (web) -> web.ignoring().antMatchers("/resources/**");
108+
* }
109+
* </pre> See the <a href=
110+
* "https://spring.io/blog/2022/02/21/spring-security-without-the-websecurityconfigureradapter">Spring
111+
* Security without WebSecurityConfigurerAdapter</a> for more details.
95112
*/
96113
@Order(100)
97114
@Deprecated

0 commit comments

Comments
 (0)