Merge branch '2.4.x'

Closes gh-24607
This commit is contained in:
Stephane Nicoll
2020-12-23 16:09:13 +01:00
6 changed files with 21 additions and 21 deletions

View File

@@ -90,8 +90,8 @@ Any dependencies that are required when running embedded but are not required wh
[[executable-jar-war-index-files]]
=== Index Files
Spring Boot Loader-compatible jar and war archives can include additional index files under the `BOOT-INF/` directory.
A `classpath.idx` file can be provided for both jars and wars, it provides the ordering that jars should be added to the classpath.
The `layers.idx` file can be used only for jars, it allows a jar to be split into logical layers for Docker/OCI image creation.
A `classpath.idx` file can be provided for both jars and wars, and it provides the ordering that jars should be added to the classpath.
The `layers.idx` file can be used only for jars, and it allows a jar to be split into logical layers for Docker/OCI image creation.
Index files follow a YAML compatible syntax so that they can be easily parsed by third-party tools.
These files, however, are _not_ parsed internally as YAML and they must be written in exactly the formats described below in order to be used.

View File

@@ -2439,10 +2439,10 @@ To configure Spring Security to require a secure channel for all (or some) reque
[source,java,indent=0,subs="verbatim,quotes,attributes"]
----
@Bean
public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception {
// Customize the application security
public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception {
// Customize the application security
http.requiresChannel().anyRequest().requiresSecure();
return http.build();
return http.build();
}
----

View File

@@ -359,12 +359,12 @@ A typical Spring Security configuration might look something like the following
[source,java,indent=0]
----
@Bean
public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception {
http.requestMatcher(EndpointRequest.toAnyEndpoint()).authorizeRequests((requests) ->
requests.anyRequest().hasRole("ENDPOINT_ADMIN"));
http.httpBasic();
return http.build();
@Bean
public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception {
http.requestMatcher(EndpointRequest.toAnyEndpoint()).authorizeRequests((requests) ->
requests.anyRequest().hasRole("ENDPOINT_ADMIN"));
http.httpBasic();
return http.build();
}
----
@@ -388,12 +388,12 @@ Additionally, if Spring Security is present, you would need to add custom securi
[source,java,indent=0]
----
@Bean
public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception {
http.requestMatcher(EndpointRequest.toAnyEndpoint()).authorizeRequests((requests) ->
@Bean
public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception {
http.requestMatcher(EndpointRequest.toAnyEndpoint()).authorizeRequests((requests) ->
requests.anyRequest().permitAll());
return http.build();
}
return http.build();
}
----
NOTE: In both the examples above, the configuration applies only to the actuator endpoints.