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:
Phillip Webb
2019-07-29 11:28:51 +01:00
parent 6756385049
commit 6675f49334
20 changed files with 164 additions and 124 deletions

View File

@@ -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());
}
}