diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/web/reactive/ReactiveManagementContextFactoryTests.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/web/reactive/ReactiveManagementContextFactoryTests.java index ef76afbeeb..3e50b41134 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/web/reactive/ReactiveManagementContextFactoryTests.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/web/reactive/ReactiveManagementContextFactoryTests.java @@ -52,6 +52,9 @@ public class ReactiveManagementContextFactoryTests { assertThat(childContext.getBean(TestConfiguration2.class)).isNotNull(); assertThat(childContext.getBean(ReactiveWebServerAutoConfiguration.class)) .isNotNull(); + + childContext.close(); + this.parent.close(); } @Configuration diff --git a/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/scheduling/ScheduledTasksEndpoint.java b/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/scheduling/ScheduledTasksEndpoint.java index 75bc03488e..f01d779686 100644 --- a/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/scheduling/ScheduledTasksEndpoint.java +++ b/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/scheduling/ScheduledTasksEndpoint.java @@ -120,7 +120,7 @@ public class ScheduledTasksEndpoint { (task) -> describeTriggerTask((TriggerTask) task)); } - private TaskType type; + private final TaskType type; private final RunnableDescription runnable; @@ -226,7 +226,7 @@ public class ScheduledTasksEndpoint { } /** - * A description of an {@link CronTask} or a {@link TriggerTask} with a + * A description of a {@link CronTask} or a {@link TriggerTask} with a * {@link CronTrigger}. */ public static final class CronTaskDescription extends TaskDescription { diff --git a/spring-boot-project/spring-boot-dependencies/pom.xml b/spring-boot-project/spring-boot-dependencies/pom.xml index c82c7ff432..5ac84e61d8 100644 --- a/spring-boot-project/spring-boot-dependencies/pom.xml +++ b/spring-boot-project/spring-boot-dependencies/pom.xml @@ -1239,7 +1239,7 @@ commons-logging commons-logging - + diff --git a/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/autoconfigure/RemoteDevToolsAutoConfigurationTests.java b/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/autoconfigure/RemoteDevToolsAutoConfigurationTests.java index fee5588e37..a44ad1aec1 100644 --- a/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/autoconfigure/RemoteDevToolsAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/autoconfigure/RemoteDevToolsAutoConfigurationTests.java @@ -28,8 +28,6 @@ import org.springframework.boot.devtools.remote.server.DispatcherFilter; import org.springframework.boot.devtools.restart.MockRestarter; import org.springframework.boot.devtools.restart.server.HttpRestartServer; import org.springframework.boot.devtools.restart.server.SourceFolderUrlFilter; -import org.springframework.boot.devtools.tunnel.server.HttpTunnelServer; -import org.springframework.boot.devtools.tunnel.server.TargetServerConnection; import org.springframework.boot.test.util.TestPropertyValues; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; @@ -199,21 +197,6 @@ public class RemoteDevToolsAutoConfigurationTests { } - /** - * Mock {@link HttpTunnelServer} implementation. - */ - static class MockHttpTunnelServer extends HttpTunnelServer { - - MockHttpTunnelServer(TargetServerConnection serverConnection) { - super(serverConnection); - } - - @Override - public void handle(ServerHttpRequest request, ServerHttpResponse response) { - } - - } - /** * Mock {@link HttpRestartServer} implementation. */ diff --git a/spring-boot-project/spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc b/spring-boot-project/spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc index 4ff31707ed..5eb7c2eb2f 100644 --- a/spring-boot-project/spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc +++ b/spring-boot-project/spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc @@ -400,17 +400,17 @@ content into your application. Rather, pick only the properties that you need. # SPRING RESOURCES HANDLING ({sc-spring-boot-autoconfigure}/web/ResourceProperties.{sc-ext}[ResourceProperties]) spring.resources.add-mappings=true # Whether to enable default resource handling. + spring.resources.cache.cachecontrol.cache-private= # Indicate that the response message is intended for a single user and must not be stored by a shared cache. + spring.resources.cache.cachecontrol.cache-public= # Indicate that any cache may store the response. spring.resources.cache.cachecontrol.max-age= # Maximum time the response should be cached, in seconds if no duration suffix is not specified. + spring.resources.cache.cachecontrol.must-revalidate= # Indicate that once it has become stale, a cache must not use the response without re-validating it with the server. spring.resources.cache.cachecontrol.no-cache= # Indicate that the cached response can be reused only if re-validated with the server. spring.resources.cache.cachecontrol.no-store= # Indicate to not cache the response in any case. - spring.resources.cache.cachecontrol.must-revalidate= # Indicate that once it has become stale, a cache must not use the response without re-validating it with the server. spring.resources.cache.cachecontrol.no-transform= # Indicate intermediaries (caches and others) that they should not transform the response content. - spring.resources.cache.cachecontrol.cache-public= # Indicate that any cache may store the response. - spring.resources.cache.cachecontrol.cache-private= # Indicate that the response message is intended for a single user and must not be stored by a shared cache. spring.resources.cache.cachecontrol.proxy-revalidate= # Same meaning as the "must-revalidate" directive, except that it does not apply to private caches. - spring.resources.cache.cachecontrol.stale-while-revalidate= # Maximum time the response can be served after it becomes stale, in seconds if no duration suffix is not specified. - spring.resources.cache.cachecontrol.stale-if-error= # Maximum time the response may be used when errors are encountered, in seconds if no duration suffix is not specified. spring.resources.cache.cachecontrol.s-max-age= # Maximum time the response should be cached by shared caches, in seconds if no duration suffix is not specified. + spring.resources.cache.cachecontrol.stale-if-error= # Maximum time the response may be used when errors are encountered, in seconds if no duration suffix is not specified. + spring.resources.cache.cachecontrol.stale-while-revalidate= # Maximum time the response can be served after it becomes stale, in seconds if no duration suffix is not specified. spring.resources.cache.period= # Cache period for the resources served by the resource handler. If a duration suffix is not specified, seconds will be used. spring.resources.chain.cache=true # Whether to enable caching in the Resource chain. spring.resources.chain.enabled= # Whether to enable the Spring Resource Handling chain. By default, disabled unless at least one strategy has been enabled. diff --git a/spring-boot-project/spring-boot-docs/src/main/asciidoc/production-ready-features.adoc b/spring-boot-project/spring-boot-docs/src/main/asciidoc/production-ready-features.adoc index 20ab0b8bd1..328b87dfb3 100644 --- a/spring-boot-project/spring-boot-docs/src/main/asciidoc/production-ready-features.adoc +++ b/spring-boot-project/spring-boot-docs/src/main/asciidoc/production-ready-features.adoc @@ -67,13 +67,13 @@ The following technology-agnostic endpoints are available: |`auditevents` |Exposes audit events information for the current application. +|`beans` +|Displays a complete list of all the Spring beans in your application. + |`conditions` |Showing the conditions that were evaluated on configuration and auto-configuration classes and the reasons why they did or did not match. -|`beans` -|Displays a complete list of all the Spring beans in your application. - |`configprops` |Displays a collated list of all `@ConfigurationProperties`. @@ -281,7 +281,7 @@ Here's an example that remaps `/actuator/health` to `/healthcheck`: [source,properties,indent=0] ---- management.endpoints.web.base-path=/ - management.endpoints.path-mapping.health=healthcheck + management.endpoints.web.path-mapping.health=healthcheck ---- diff --git a/spring-boot-project/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc b/spring-boot-project/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc index 291147742d..4701ba28c6 100644 --- a/spring-boot-project/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc +++ b/spring-boot-project/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc @@ -2022,7 +2022,7 @@ post] and in Spring Framework's [[boot-features-spring-mvc-welcome-page]] ==== Welcome Page -Spring Boot support both static and templated welcome pages. It first looks for an +Spring Boot supports both static and templated welcome pages. It first looks for an `index.html` file in the configured static content locations. If one is not found, it then looks for an `index` template. If either is found it is automatically used as the welcome page of the application. diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/embedded/tomcat/TomcatServletWebServerFactory.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/embedded/tomcat/TomcatServletWebServerFactory.java index 3a6f759cc4..bb776e7f43 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/embedded/tomcat/TomcatServletWebServerFactory.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/embedded/tomcat/TomcatServletWebServerFactory.java @@ -185,7 +185,7 @@ public class TomcatServletWebServerFactory extends AbstractServletWebServerFacto protected void prepareContext(Host host, ServletContextInitializer[] initializers) { File documentRoot = getValidDocumentRoot(); - final TomcatEmbeddedContext context = new TomcatEmbeddedContext(); + TomcatEmbeddedContext context = new TomcatEmbeddedContext(); if (documentRoot != null) { context.setResources(new LoaderHidingResourceRoot(context)); }