diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/resources/META-INF/additional-spring-configuration-metadata.json index 9ef8ab6526a..7832165303a 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/resources/META-INF/additional-spring-configuration-metadata.json +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/resources/META-INF/additional-spring-configuration-metadata.json @@ -1926,7 +1926,7 @@ }, { "name": "management.metrics.graphql.autotime.enabled", - "description": "Whether to automatically time GraphQL requests.", + "description": "Whether to automatically time web client requests.", "defaultValue": true, "deprecation": { "level": "error", diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/OnPropertyCondition.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/OnPropertyCondition.java index 45d65167d11..99df172acd1 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/OnPropertyCondition.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/OnPropertyCondition.java @@ -117,10 +117,12 @@ class OnPropertyCondition extends SpringBootCondition { private String[] getNames(AnnotationAttributes annotationAttributes) { String[] value = (String[]) annotationAttributes.get("value"); String[] name = (String[]) annotationAttributes.get("name"); - Assert.state(value.length > 0 || name.length > 0, "The name or value attribute of @%s must be specified" - .formatted(ClassUtils.getShortName(this.annotationType))); - Assert.state(value.length == 0 || name.length == 0, "The name and value attributes of @%s are exclusive" - .formatted(ClassUtils.getShortName(this.annotationType))); + Assert.state(value.length > 0 || name.length > 0, + () -> "The name or value attribute of @%s must be specified" + .formatted(ClassUtils.getShortName(this.annotationType))); + Assert.state(value.length == 0 || name.length == 0, + () -> "The name and value attributes of @%s are exclusive" + .formatted(ClassUtils.getShortName(this.annotationType))); return (value.length > 0) ? value : name; } diff --git a/spring-boot-project/spring-boot-dependencies/build.gradle b/spring-boot-project/spring-boot-dependencies/build.gradle index f4c9693dbdf..64606090f0a 100644 --- a/spring-boot-project/spring-boot-dependencies/build.gradle +++ b/spring-boot-project/spring-boot-dependencies/build.gradle @@ -2492,13 +2492,6 @@ bom { ] } } - library("WebJars Locator Lite", "1.0.1") { - group("org.webjars") { - modules = [ - "webjars-locator-lite" - ] - } - } library("WebJars Locator Core", "0.59") { group("org.webjars") { modules = [ @@ -2506,6 +2499,13 @@ bom { ] } } + library("WebJars Locator Lite", "1.0.1") { + group("org.webjars") { + modules = [ + "webjars-locator-lite" + ] + } + } library("WSDL4j", "1.6.3") { group("wsdl4j") { modules = [ diff --git a/spring-boot-project/spring-boot-docker-compose/src/dockerTest/java/org/springframework/boot/docker/compose/service/connection/postgres/PostgresJdbcDockerComposeConnectionDetailsFactoryIntegrationTests.java b/spring-boot-project/spring-boot-docker-compose/src/dockerTest/java/org/springframework/boot/docker/compose/service/connection/postgres/PostgresJdbcDockerComposeConnectionDetailsFactoryIntegrationTests.java index 403b3be9191..430358fe944 100644 --- a/spring-boot-project/spring-boot-docker-compose/src/dockerTest/java/org/springframework/boot/docker/compose/service/connection/postgres/PostgresJdbcDockerComposeConnectionDetailsFactoryIntegrationTests.java +++ b/spring-boot-project/spring-boot-docker-compose/src/dockerTest/java/org/springframework/boot/docker/compose/service/connection/postgres/PostgresJdbcDockerComposeConnectionDetailsFactoryIntegrationTests.java @@ -84,7 +84,7 @@ class PostgresJdbcDockerComposeConnectionDetailsFactoryIntegrationTests { } @SuppressWarnings("unchecked") - private T executeQuery(JdbcConnectionDetails connectionDetails, String sql, Class result) + private T executeQuery(JdbcConnectionDetails connectionDetails, String sql, Class resultClass) throws ClassNotFoundException { SimpleDriverDataSource dataSource = new SimpleDriverDataSource(); dataSource.setUrl(connectionDetails.getJdbcUrl()); @@ -92,7 +92,7 @@ class PostgresJdbcDockerComposeConnectionDetailsFactoryIntegrationTests { dataSource.setPassword(connectionDetails.getPassword()); dataSource.setDriverClass((Class) ClassUtils.forName(connectionDetails.getDriverClassName(), getClass().getClassLoader())); - return new JdbcTemplate(dataSource).queryForObject(sql, result); + return new JdbcTemplate(dataSource).queryForObject(sql, resultClass); } } diff --git a/spring-boot-project/spring-boot-docker-compose/src/dockerTest/java/org/springframework/boot/docker/compose/service/connection/postgres/PostgresR2dbcDockerComposeConnectionDetailsFactoryIntegrationTests.java b/spring-boot-project/spring-boot-docker-compose/src/dockerTest/java/org/springframework/boot/docker/compose/service/connection/postgres/PostgresR2dbcDockerComposeConnectionDetailsFactoryIntegrationTests.java index 29df612dab8..d1b5c8bfe02 100644 --- a/spring-boot-project/spring-boot-docker-compose/src/dockerTest/java/org/springframework/boot/docker/compose/service/connection/postgres/PostgresR2dbcDockerComposeConnectionDetailsFactoryIntegrationTests.java +++ b/spring-boot-project/spring-boot-docker-compose/src/dockerTest/java/org/springframework/boot/docker/compose/service/connection/postgres/PostgresR2dbcDockerComposeConnectionDetailsFactoryIntegrationTests.java @@ -88,11 +88,11 @@ class PostgresR2dbcDockerComposeConnectionDetailsFactoryIntegrationTests { .isEqualTo(1); } - private T executeQuery(R2dbcConnectionDetails connectionDetails, String sql, Class result) { + private T executeQuery(R2dbcConnectionDetails connectionDetails, String sql, Class resultClass) { ConnectionFactoryOptions connectionFactoryOptions = connectionDetails.getConnectionFactoryOptions(); return DatabaseClient.create(ConnectionFactories.get(connectionFactoryOptions)) .sql(sql) - .mapValue(result) + .mapValue(resultClass) .first() .block(Duration.ofSeconds(30)); } diff --git a/spring-boot-project/spring-boot-docker-compose/src/main/java/org/springframework/boot/docker/compose/core/DockerCliCommand.java b/spring-boot-project/spring-boot-docker-compose/src/main/java/org/springframework/boot/docker/compose/core/DockerCliCommand.java index 50e74f6c2ae..f72b467d617 100644 --- a/spring-boot-project/spring-boot-docker-compose/src/main/java/org/springframework/boot/docker/compose/core/DockerCliCommand.java +++ b/spring-boot-project/spring-boot-docker-compose/src/main/java/org/springframework/boot/docker/compose/core/DockerCliCommand.java @@ -276,7 +276,7 @@ abstract sealed class DockerCliCommand { */ record ComposeVersion(int major, int minor) { - public static final ComposeVersion UNKNOWN = new ComposeVersion(0, 0); + static final ComposeVersion UNKNOWN = new ComposeVersion(0, 0); boolean isLessThan(int major, int minor) { return major() < major || major() == major && minor() < minor; diff --git a/spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/features/dev-services.adoc b/spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/features/dev-services.adoc index 0837d4d3baa..ed9f4440733 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/features/dev-services.adoc +++ b/spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/features/dev-services.adoc @@ -377,7 +377,7 @@ NOTE: Using a javadoc:org.springframework.boot.testcontainers.service.connection [[features.dev-services.testcontainers.at-development-time.importing-container-declarations]] -==== Importing Testcontainer Declaration Classes +==== Importing Testcontainers Declaration Classes A common pattern when using Testcontainers is to declare javadoc:org.testcontainers.containers.Container[] instances as static fields. Often these fields are defined directly on the test class. @@ -402,7 +402,7 @@ You can also add javadoc:org.springframework.test.context.DynamicPropertySource[ When using devtools, you can annotate beans and bean methods with javadoc:org.springframework.boot.devtools.restart.RestartScope[format=annotation]. Such beans won't be recreated when the devtools restart the application. -This is especially useful for Testcontainer javadoc:org.testcontainers.containers.Container[] beans, as they keep their state despite the application restart. +This is especially useful for javadoc:org.testcontainers.containers.Container[] beans, as they keep their state despite the application restart. include-code::MyContainersConfiguration[] diff --git a/spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/jdbc/AutoConfigureTestDatabase.java b/spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/jdbc/AutoConfigureTestDatabase.java index 4283a1ca8be..26284c3a27e 100644 --- a/spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/jdbc/AutoConfigureTestDatabase.java +++ b/spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/jdbc/AutoConfigureTestDatabase.java @@ -77,7 +77,7 @@ public @interface AutoConfigureTestDatabase { * databases: *
    *
  • Any bean definition that includes {@link ContainerImageMetadata} (including - * {@code @ServiceConnection} annotated Testcontainer databases, and connections + * {@code @ServiceConnection} annotated Testcontainers databases, and connections * created using Docker Compose)
  • *
  • Any connection configured using a {@code spring.datasource.url} backed by a * {@link DynamicPropertySource @DynamicPropertySource}
  • diff --git a/spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/web/client/TestRestTemplateTests.java b/spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/web/client/TestRestTemplateTests.java index af69217f1f8..6113165fc5a 100644 --- a/spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/web/client/TestRestTemplateTests.java +++ b/spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/web/client/TestRestTemplateTests.java @@ -155,7 +155,7 @@ class TestRestTemplateTests { } @Test - void httpComponentsAreBuildConsideringSettingsInRestTemplateBuilder() { + void httpComponentsAreBuiltConsideringSettingsInRestTemplateBuilder() { RestTemplateBuilder builder = new RestTemplateBuilder() .requestFactoryBuilder(ClientHttpRequestFactoryBuilder.httpComponents()); assertThat(getRequestConfig((RestTemplateBuilder) null).isRedirectsEnabled()).isFalse(); @@ -209,9 +209,8 @@ class TestRestTemplateTests { return factory.createRequestConfig(); } - private HttpClient getJdkHttpClient(TestRestTemplate templateWithRedirects) { - JdkClientHttpRequestFactory requestFactory = (JdkClientHttpRequestFactory) templateWithRedirects - .getRestTemplate() + private HttpClient getJdkHttpClient(TestRestTemplate template) { + JdkClientHttpRequestFactory requestFactory = (JdkClientHttpRequestFactory) template.getRestTemplate() .getRequestFactory(); return (HttpClient) ReflectionTestUtils.getField(requestFactory, "httpClient"); } diff --git a/spring-boot-project/spring-boot-testcontainers/src/dockerTest/java/org/springframework/boot/testcontainers/service/connection/ServiceConnectionStartsConnectionOnceIntegrationTest.java b/spring-boot-project/spring-boot-testcontainers/src/dockerTest/java/org/springframework/boot/testcontainers/service/connection/ServiceConnectionStartsConnectionOnceIntegrationTests.java similarity index 97% rename from spring-boot-project/spring-boot-testcontainers/src/dockerTest/java/org/springframework/boot/testcontainers/service/connection/ServiceConnectionStartsConnectionOnceIntegrationTest.java rename to spring-boot-project/spring-boot-testcontainers/src/dockerTest/java/org/springframework/boot/testcontainers/service/connection/ServiceConnectionStartsConnectionOnceIntegrationTests.java index 45f96e98b91..a5f3005d8e6 100644 --- a/spring-boot-project/spring-boot-testcontainers/src/dockerTest/java/org/springframework/boot/testcontainers/service/connection/ServiceConnectionStartsConnectionOnceIntegrationTest.java +++ b/spring-boot-project/spring-boot-testcontainers/src/dockerTest/java/org/springframework/boot/testcontainers/service/connection/ServiceConnectionStartsConnectionOnceIntegrationTests.java @@ -39,7 +39,7 @@ import static org.assertj.core.api.Assertions.assertThat; */ @SpringJUnitConfig @Testcontainers(disabledWithoutDocker = true) -class ServiceConnectionStartsConnectionOnceIntegrationTest { +class ServiceConnectionStartsConnectionOnceIntegrationTests { @Container @ServiceConnection diff --git a/spring-boot-project/spring-boot-testcontainers/src/main/java/org/springframework/boot/testcontainers/context/ImportTestcontainers.java b/spring-boot-project/spring-boot-testcontainers/src/main/java/org/springframework/boot/testcontainers/context/ImportTestcontainers.java index f20b98651f3..1af2eee987f 100644 --- a/spring-boot-project/spring-boot-testcontainers/src/main/java/org/springframework/boot/testcontainers/context/ImportTestcontainers.java +++ b/spring-boot-project/spring-boot-testcontainers/src/main/java/org/springframework/boot/testcontainers/context/ImportTestcontainers.java @@ -30,7 +30,7 @@ import org.springframework.context.ApplicationContext; import org.springframework.context.annotation.Import; /** - * Imports idiomatic Testcontainer declaration classes into the Spring + * Imports idiomatic Testcontainers declaration classes into the Spring * {@link ApplicationContext}. The following elements will be considered from the imported * classes: *
      diff --git a/spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/test/java/org/springframework/boot/buildpack/platform/docker/ProgressUpdateEventTests.java b/spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/test/java/org/springframework/boot/buildpack/platform/docker/ProgressUpdateEventTests.java index 4e395887152..6044f6fe0f2 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/test/java/org/springframework/boot/buildpack/platform/docker/ProgressUpdateEventTests.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/test/java/org/springframework/boot/buildpack/platform/docker/ProgressUpdateEventTests.java @@ -39,13 +39,13 @@ abstract class ProgressUpdateEventTests { } @Test - void getProgressDetailsReturnsProgressDetails() { + void getProgressDetailReturnsProgressDetails() { ProgressUpdateEvent event = createEvent(); assertThat(event.getProgressDetail().asPercentage()).isEqualTo(50); } @Test - void getProgressDetailsReturnsProgressDetailsForLongNumbers() { + void getProgressDetailReturnsProgressDetailsForLongNumbers() { ProgressUpdateEvent event = createEvent("status", new ProgressDetail(4000000000L, 8000000000L), "progress"); assertThat(event.getProgressDetail().asPercentage()).isEqualTo(50); } diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/jdbc/DataSourceBuilder.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/jdbc/DataSourceBuilder.java index b2ca301877a..697363e30c1 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/jdbc/DataSourceBuilder.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/jdbc/DataSourceBuilder.java @@ -61,7 +61,7 @@ import org.springframework.util.StringUtils; *
    • Apache DBCP2 ({@code org.apache.commons.dbcp2.BasicDataSource})
    • *
    • Oracle UCP ({@code oracle.ucp.jdbc.PoolDataSourceImpl})
    • *
    • C3P0 ({@code com.mchange.v2.c3p0.ComboPooledDataSource})
    • - *
    • Vibur {@code org.vibur.dbcp.ViburDBCPDataSource}
    • + *
    • Vibur ({@code org.vibur.dbcp.ViburDBCPDataSource})
    • *
    *

    * The following non-pooling {@link DataSource} implementations can be used when diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/jms/ConnectionFactoryUnwrapper.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/jms/ConnectionFactoryUnwrapper.java index ec98a93b21e..79945ec9d88 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/jms/ConnectionFactoryUnwrapper.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/jms/ConnectionFactoryUnwrapper.java @@ -34,7 +34,7 @@ public final class ConnectionFactoryUnwrapper { } /** - * Return the native {@link ConnectionFactory} by unwrapping ot from a + * Return the native {@link ConnectionFactory} by unwrapping from a * {@link CachingConnectionFactory}. Return the given {@link ConnectionFactory} if no * {@link CachingConnectionFactory} wrapper has been detected. * @param connectionFactory a connection factory diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/logging/LoggingSystemProperty.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/logging/LoggingSystemProperty.java index c06f803351d..5da11f1cbf3 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/logging/LoggingSystemProperty.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/logging/LoggingSystemProperty.java @@ -142,8 +142,7 @@ public enum LoggingSystemProperty { } /** - * Return the name of the application property name that can be used to set this - * property. + * Return the application property name that can be used to set this property. * @return the application property name * @since 3.4.0 */ diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/logging/log4j2/Log4J2LoggingSystem.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/logging/log4j2/Log4J2LoggingSystem.java index b4bc2733965..8a60353f358 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/logging/log4j2/Log4J2LoggingSystem.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/logging/log4j2/Log4J2LoggingSystem.java @@ -228,8 +228,8 @@ public class Log4J2LoggingSystem extends AbstractLoggingSystem { /** * Reset the stream used by the fallback listener to the current system out. This - * allows the fallback lister to work with any captured output streams in a similar - * way to the {@code follow} attribute of the {@code literal Console} appender. + * allows the fallback listener to work with any captured output streams in a similar + * way to the {@code follow} attribute of the {@code Console} appender. * @param statusLogger the status logger to update */ private void resetFallbackListenerStream(StatusLogger statusLogger) { diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/logging/logback/DebugLogbackConfigurator.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/logging/logback/DebugLogbackConfigurator.java index 3e05b604004..800bf0c0049 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/logging/logback/DebugLogbackConfigurator.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/logging/logback/DebugLogbackConfigurator.java @@ -47,13 +47,13 @@ class DebugLogbackConfigurator extends LogbackConfigurator { } @Override - public void appender(String name, Appender appender) { + void appender(String name, Appender appender) { info("Adding appender '" + appender + "' named '" + name + "'"); super.appender(name, appender); } @Override - public void logger(String name, Level level, boolean additive, Appender appender) { + void logger(String name, Level level, boolean additive, Appender appender) { info("Configuring logger '" + name + "' with level '" + level + "'. Additive: " + additive); if (appender != null) { info("Adding appender '" + appender + "' to logger '" + name + "'"); @@ -62,7 +62,7 @@ class DebugLogbackConfigurator extends LogbackConfigurator { } @Override - public void start(LifeCycle lifeCycle) { + void start(LifeCycle lifeCycle) { info("Starting '" + lifeCycle + "'"); super.start(lifeCycle); } diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/logging/logback/FilteringStatusListener.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/logging/logback/FilteringStatusListener.java index 247272bb856..9917c6fb9a1 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/logging/logback/FilteringStatusListener.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/logging/logback/FilteringStatusListener.java @@ -35,7 +35,7 @@ class FilteringStatusListener extends ContextAwareBase implements StatusListener /** * Creates a new {@link FilteringStatusListener}. - * @param delegate the {@link StatusListener} delegate to + * @param delegate the {@link StatusListener} to delegate to * @param levelThreshold the minimum log level accepted for delegation */ FilteringStatusListener(StatusListener delegate, int levelThreshold) { diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/logging/logback/FilteringStatusListenerTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/logging/logback/FilteringStatusListenerTests.java index c2533ed39a4..e47a6889ccd 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/logging/logback/FilteringStatusListenerTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/logging/logback/FilteringStatusListenerTests.java @@ -52,7 +52,7 @@ class FilteringStatusListenerTests { @Test void shouldStartUnderlyingStatusListener() { - FilteringStatusListener listener = createListener(Status.INFO); + FilteringStatusListener listener = createListener(); assertThat(this.delegate.isStarted()).isFalse(); listener.start(); assertThat(this.delegate.isStarted()).isTrue();