From f39f215140ebf042852935a0bc61cccef289fd5e Mon Sep 17 00:00:00 2001
From: Mitja Kotnik
Date: Wed, 23 Nov 2022 20:32:55 +0100
Subject: [PATCH] Replace javadoc with SecurityFilterChain bean definition
---
.../web/configurers/UrlAuthorizationConfigurer.java | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/config/src/main/java/org/springframework/security/config/annotation/web/configurers/UrlAuthorizationConfigurer.java b/config/src/main/java/org/springframework/security/config/annotation/web/configurers/UrlAuthorizationConfigurer.java
index 0fae7eff10..85ad311a43 100644
--- a/config/src/main/java/org/springframework/security/config/annotation/web/configurers/UrlAuthorizationConfigurer.java
+++ b/config/src/main/java/org/springframework/security/config/annotation/web/configurers/UrlAuthorizationConfigurer.java
@@ -49,10 +49,11 @@ import org.springframework.util.Assert;
*
*
*
- * 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");
* }
*
*