File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
config/src/main/java/org/springframework/security/config/annotation/web/builders Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change 107
107
* A {@link HttpSecurity} is similar to Spring Security's XML <http> element in the
108
108
* namespace configuration. It allows configuring web based security for specific http
109
109
* requests. By default it will be applied to all requests, but can be restricted using
110
- * {@link #requestMatcher(RequestMatcher )} or other similar methods.
110
+ * {@link #authorizeHttpRequests(Customizer )} or other similar methods.
111
111
*
112
112
* <h2>Example Usage</h2>
113
113
*
124
124
*
125
125
* @Bean
126
126
* public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception {
127
- * http.authorizeHttpRequests().requestMatchers("/**").hasRole("USER").and().formLogin();
127
+ * http
128
+ * .authorizeHttpRequests((authorizeHttpRequests) ->
129
+ * authorizeHttpRequests
130
+ * .requestMatchers("/**").hasRole("USER")
131
+ * )
132
+ * .formLogin(withDefaults());
128
133
* return http.build();
129
134
* }
130
135
*
You can’t perform that action at this time.
0 commit comments