Skip to content

Commit f39f215

Browse files
cotnicmarcusdacoregio
authored andcommitted
Replace javadoc with SecurityFilterChain bean definition
1 parent 626e53d commit f39f215

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

config/src/main/java/org/springframework/security/config/annotation/web/configurers/UrlAuthorizationConfigurer.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,11 @@
4949
* </p>
5050
*
5151
* <pre>
52-
* protected void configure(HttpSecurity http) throws Exception {
53-
* http.apply(new UrlAuthorizationConfigurer&lt;HttpSecurity&gt;()).getRegistry()
54-
* .antMatchers(&quot;/users**&quot;, &quot;/sessions/**&quot;).hasRole(&quot;USER&quot;)
55-
* .antMatchers(&quot;/signup&quot;).hasRole(&quot;ANONYMOUS&quot;).anyRequest().hasRole(&quot;USER&quot;);
52+
* &#64;Bean
53+
* public SecurityFilterChain filterChain(HttpSecurity http, ApplicationContext context) throws Exception {
54+
* http.apply(new UrlAuthorizationConfigurer&lt;HttpSecurity&gt;(context)).getRegistry()
55+
* .requestMatchers(&quot;/users**&quot;, &quot;/sessions/**&quot;).hasRole(&quot;USER&quot;)
56+
* .requestMatchers(&quot;/signup&quot;).hasRole(&quot;ANONYMOUS&quot;).anyRequest().hasRole(&quot;USER&quot;);
5657
* }
5758
* </pre>
5859
*

0 commit comments

Comments
 (0)