|
@@ -49,10 +49,11 @@ import org.springframework.util.Assert;
|
|
|
* </p>
|
|
|
*
|
|
|
* <pre>
|
|
|
- * protected void configure(HttpSecurity http) throws Exception {
|
|
|
- * http.apply(new UrlAuthorizationConfigurer<HttpSecurity>()).getRegistry()
|
|
|
- * .antMatchers("/users**", "/sessions/**").hasRole("USER")
|
|
|
- * .antMatchers("/signup").hasRole("ANONYMOUS").anyRequest().hasRole("USER");
|
|
|
+ * @Bean
|
|
|
+ * public SecurityFilterChain filterChain(HttpSecurity http, ApplicationContext context) throws Exception {
|
|
|
+ * http.apply(new UrlAuthorizationConfigurer<HttpSecurity>(context)).getRegistry()
|
|
|
+ * .requestMatchers("/users**", "/sessions/**").hasRole("USER")
|
|
|
+ * .requestMatchers("/signup").hasRole("ANONYMOUS").anyRequest().hasRole("USER");
|
|
|
* }
|
|
|
* </pre>
|
|
|
*
|