Switch to multi-line security configuration
Now that we have lambda style security configuration we can further improve readability by switching to one statement per line. See gh-17525
This commit is contained in:
@@ -396,10 +396,9 @@ A typical Spring Security configuration might look something like the following
|
||||
|
||||
@Override
|
||||
protected void configure(HttpSecurity http) throws Exception {
|
||||
http.requestMatcher(EndpointRequest.toAnyEndpoint())
|
||||
.authorizeRequests((requests) ->
|
||||
requests.anyRequest().hasRole("ENDPOINT_ADMIN"))
|
||||
.httpBasic();
|
||||
http.requestMatcher(EndpointRequest.toAnyEndpoint()).authorizeRequests((requests) ->
|
||||
requests.anyRequest().hasRole("ENDPOINT_ADMIN"));
|
||||
http.httpBasic();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -433,7 +432,7 @@ following example:
|
||||
@Override
|
||||
protected void configure(HttpSecurity http) throws Exception {
|
||||
http.requestMatcher(EndpointRequest.toAnyEndpoint()).authorizeRequests((requests) ->
|
||||
.anyRequest().permitAll());
|
||||
requests.anyRequest().permitAll());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user