mirror of
https://github.com/spring-projects/spring-security.git
synced 2025-09-08 20:51:41 +00:00
Replace javadoc with SecurityFilterChain bean definition
This commit is contained in:
parent
626e53d121
commit
f39f215140
@ -49,10 +49,11 @@ import org.springframework.util.Assert;
|
|||||||
* </p>
|
* </p>
|
||||||
*
|
*
|
||||||
* <pre>
|
* <pre>
|
||||||
* protected void configure(HttpSecurity http) throws Exception {
|
* @Bean
|
||||||
* http.apply(new UrlAuthorizationConfigurer<HttpSecurity>()).getRegistry()
|
* public SecurityFilterChain filterChain(HttpSecurity http, ApplicationContext context) throws Exception {
|
||||||
* .antMatchers("/users**", "/sessions/**").hasRole("USER")
|
* http.apply(new UrlAuthorizationConfigurer<HttpSecurity>(context)).getRegistry()
|
||||||
* .antMatchers("/signup").hasRole("ANONYMOUS").anyRequest().hasRole("USER");
|
* .requestMatchers("/users**", "/sessions/**").hasRole("USER")
|
||||||
|
* .requestMatchers("/signup").hasRole("ANONYMOUS").anyRequest().hasRole("USER");
|
||||||
* }
|
* }
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user