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 ff1919d292d..72c55331aba 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 @@ -63,7 +63,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()); @@ -71,7 +71,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 80f4f88c0de..78ea6d28346 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 @@ -63,11 +63,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 59686d10165..07ccdcdbe46 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 @@ -241,7 +241,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 ad3ae9609ee..4e9d83662ed 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 @@ -371,7 +371,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. @@ -396,7 +396,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-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 5f99743017b..704b6aa4c01 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 @@ -28,7 +28,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/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 e98296ef631..0ab68bdd043 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 @@ -45,13 +45,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 + "'"); @@ -60,7 +60,7 @@ class DebugLogbackConfigurator extends LogbackConfigurator { } @Override - public void start(LifeCycle lifeCycle) { + void start(LifeCycle lifeCycle) { info("Starting '" + lifeCycle + "'"); super.start(lifeCycle); }