diff --git a/buildSrc/src/main/java/org/springframework/boot/build/EclipseConventions.java b/buildSrc/src/main/java/org/springframework/boot/build/EclipseConventions.java index e292eddd85..bcd00e0a1e 100644 --- a/buildSrc/src/main/java/org/springframework/boot/build/EclipseConventions.java +++ b/buildSrc/src/main/java/org/springframework/boot/build/EclipseConventions.java @@ -58,7 +58,7 @@ class EclipseConventions { } private boolean isKotlinPluginContributedBuildDirectory(String path) { - return path.contains("/main") && path.contains("/build/classes/") || path.contains("/build/resources/"); + return path.contains("/main") && (path.contains("/build/classes/") || path.contains("/build/resources/")); } private boolean isTest(Library library) { diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/cloudfoundry/reactive/ReactiveCloudFoundryActuatorAutoConfiguration.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/cloudfoundry/reactive/ReactiveCloudFoundryActuatorAutoConfiguration.java index 722cab5c1a..a9e011b952 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/cloudfoundry/reactive/ReactiveCloudFoundryActuatorAutoConfiguration.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/cloudfoundry/reactive/ReactiveCloudFoundryActuatorAutoConfiguration.java @@ -175,13 +175,13 @@ public class ReactiveCloudFoundryActuatorAutoConfiguration { @Override public Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException { if (bean instanceof WebFilterChainProxy webFilterChainProxy) { - return postProcess(webFilterChainProxy, this.pathMappedEndpoints.get()); + return postProcess(webFilterChainProxy); } return bean; } - private WebFilterChainProxy postProcess(WebFilterChainProxy existing, PathMappedEndpoints pathMappedEndpoints) { - List paths = getPaths(pathMappedEndpoints); + private WebFilterChainProxy postProcess(WebFilterChainProxy existing) { + List paths = getPaths(this.pathMappedEndpoints.get()); ServerWebExchangeMatcher cloudFoundryRequestMatcher = ServerWebExchangeMatchers .pathMatchers(paths.toArray(new String[] {})); WebFilter noOpFilter = (exchange, chain) -> chain.filter(exchange); diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/cloudfoundry/reactive/ReactiveCloudFoundryActuatorAutoConfigurationTests.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/cloudfoundry/reactive/ReactiveCloudFoundryActuatorAutoConfigurationTests.java index fb163a7364..2f4c99c0bc 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/cloudfoundry/reactive/ReactiveCloudFoundryActuatorAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/cloudfoundry/reactive/ReactiveCloudFoundryActuatorAutoConfigurationTests.java @@ -205,10 +205,9 @@ class ReactiveCloudFoundryActuatorAutoConfigurationTests { } private static Boolean getMatches(List filters, String urlTemplate) { - Boolean cfBaseRequestMatches = filters.get(0) + return filters.get(0) .matches(MockServerWebExchange.from(MockServerHttpRequest.get(urlTemplate).build())) .block(Duration.ofSeconds(30)); - return cfBaseRequestMatches; } @Test diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/cloudfoundry/servlet/CloudFoundryActuatorAutoConfigurationTests.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/cloudfoundry/servlet/CloudFoundryActuatorAutoConfigurationTests.java index a1bbf024eb..dbd0b28dd2 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/cloudfoundry/servlet/CloudFoundryActuatorAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/cloudfoundry/servlet/CloudFoundryActuatorAutoConfigurationTests.java @@ -69,6 +69,8 @@ class CloudFoundryActuatorAutoConfigurationTests { private static final String V3_JSON = ApiVersion.V3.getProducedMimeType().toString(); + private static final String BASE_PATH = "/cloudfoundryapplication"; + private final WebApplicationContextRunner contextRunner = new WebApplicationContextRunner() .withConfiguration(AutoConfigurations.of(SecurityAutoConfiguration.class, WebMvcAutoConfiguration.class, JacksonAutoConfiguration.class, DispatcherServletAutoConfiguration.class, @@ -77,8 +79,6 @@ class CloudFoundryActuatorAutoConfigurationTests { ServletManagementContextAutoConfiguration.class, EndpointAutoConfiguration.class, WebEndpointAutoConfiguration.class, CloudFoundryActuatorAutoConfiguration.class)); - private static String BASE_PATH = "/cloudfoundryapplication"; - @Test void cloudFoundryPlatformActive() { this.contextRunner @@ -189,9 +189,9 @@ class CloudFoundryActuatorAutoConfigurationTests { }); } - private static void testCloudFoundrySecurity(MockHttpServletRequest request, String basePath, + private static void testCloudFoundrySecurity(MockHttpServletRequest request, String servletPath, SecurityFilterChain chain) { - request.setServletPath(basePath); + request.setServletPath(servletPath); assertThat(chain.matches(request)).isTrue(); } diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/batch/BatchConversionServiceCustomizer.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/batch/BatchConversionServiceCustomizer.java index a75a9a30d8..21233ef522 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/batch/BatchConversionServiceCustomizer.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/batch/BatchConversionServiceCustomizer.java @@ -23,7 +23,7 @@ import org.springframework.core.convert.support.ConfigurableConversionService; * Callback interface that can be implemented by beans wishing to customize the * {@link ConfigurableConversionService} that is * {@link DefaultBatchConfiguration#getConversionService provided by - * DefaultBatchAutoConfiguration} while retaining its default auto-configuration. + * DefaultBatchConfiguration} while retaining its default auto-configuration. * * @author Claudio Nave * @since 3.1.0 diff --git a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/features/docker-compose.adoc b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/features/docker-compose.adoc index 6621b51576..248345a387 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/features/docker-compose.adoc +++ b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/features/docker-compose.adoc @@ -48,7 +48,7 @@ When doing so, the connection details take precedence over any connection-relate When using Spring Boot’s Docker Compose support, service connections are established to the port mapped by the container. NOTE: Docker compose is usually used in such a way that the ports inside the container are mapped to ephemeral ports on your computer. -For example, A Postgres server my run inside the container using port 5432 but be mapped to a totally different port locally. +For example, A Postgres server may run inside the container using port 5432 but be mapped to a totally different port locally. The service connection will always discover and use the locally mapped port. Service connections are established by using the image name of the container. @@ -154,7 +154,7 @@ The recommended way of checking for readiness is to add a `healthcheck` section Since it's not uncommon for `healthcheck` configuration to be omitted from `compose.yml` files, Spring Boot also checks directly for service readiness. By default, a container is considered ready when a TCP/IP connection can be established to its mapped port. -You can disable this on a per-container basis by add a `org.springframework.boot.readiness-check.tcp.disable` label in your `compose.yml` file. +You can disable this on a per-container basis by adding a `org.springframework.boot.readiness-check.tcp.disable` label in your `compose.yml` file. For example: diff --git a/spring-boot-project/spring-boot-testcontainers/src/main/resources/META-INF/spring.factories b/spring-boot-project/spring-boot-testcontainers/src/main/resources/META-INF/spring.factories index 8f9886edc6..2cfe37359c 100644 --- a/spring-boot-project/spring-boot-testcontainers/src/main/resources/META-INF/spring.factories +++ b/spring-boot-project/spring-boot-testcontainers/src/main/resources/META-INF/spring.factories @@ -19,10 +19,10 @@ org.springframework.boot.testcontainers.service.connection.liquibase.LiquibaseCo org.springframework.boot.testcontainers.service.connection.mongo.MongoContainerConnectionDetailsFactory,\ org.springframework.boot.testcontainers.service.connection.neo4j.Neo4jContainerConnectionDetailsFactory,\ org.springframework.boot.testcontainers.service.connection.r2dbc.MariaDbR2dbcContainerConnectionDetailsFactory,\ -org.springframework.boot.testcontainers.service.connection.r2dbc.SqlServerR2dbcContainerConnectionDetailsFactory,\ org.springframework.boot.testcontainers.service.connection.r2dbc.MySqlR2dbcContainerConnectionDetailsFactory,\ org.springframework.boot.testcontainers.service.connection.r2dbc.OracleR2dbcContainerConnectionDetailsFactory,\ org.springframework.boot.testcontainers.service.connection.r2dbc.PostgresR2dbcContainerConnectionDetailsFactory,\ +org.springframework.boot.testcontainers.service.connection.r2dbc.SqlServerR2dbcContainerConnectionDetailsFactory,\ org.springframework.boot.testcontainers.service.connection.redis.RedisContainerConnectionDetailsFactory,\ org.springframework.boot.testcontainers.service.connection.redpanda.RedpandaContainerConnectionDetailsFactory,\ org.springframework.boot.testcontainers.service.connection.zipkin.ZipkinContainerConnectionDetailsFactory