Move Flyway endpoint auto-configuration to spring-boot-flyway

See gh-46086
This commit is contained in:
Andy Wilkinson 2025-05-16 16:05:17 +01:00
parent b8a62dff07
commit e103586cfe
9 changed files with 12 additions and 14 deletions

View File

@ -35,7 +35,7 @@ configurations.all {
dependencies { dependencies {
api(project(":spring-boot-project:spring-boot-actuator-autoconfigure")) api(project(":spring-boot-project:spring-boot-actuator-autoconfigure"))
api(project(":spring-boot-project:spring-boot-autoconfigure-all")) api(project(":spring-boot-project:spring-boot-autoconfigure"))
implementation("com.fasterxml.jackson.core:jackson-databind") implementation("com.fasterxml.jackson.core:jackson-databind")
implementation("com.fasterxml.jackson.datatype:jackson-datatype-jsr310") implementation("com.fasterxml.jackson.datatype:jackson-datatype-jsr310")
@ -53,7 +53,6 @@ dependencies {
optional(project(":spring-boot-project:spring-boot-data-mongodb")) optional(project(":spring-boot-project:spring-boot-data-mongodb"))
optional(project(":spring-boot-project:spring-boot-data-neo4j")) optional(project(":spring-boot-project:spring-boot-data-neo4j"))
optional(project(":spring-boot-project:spring-boot-data-redis")) optional(project(":spring-boot-project:spring-boot-data-redis"))
optional(project(":spring-boot-project:spring-boot-flyway"))
optional(project(":spring-boot-project:spring-boot-hazelcast")) optional(project(":spring-boot-project:spring-boot-hazelcast"))
optional(project(":spring-boot-project:spring-boot-http-converter")) optional(project(":spring-boot-project:spring-boot-http-converter"))
optional(project(":spring-boot-project:spring-boot-http-codec")) optional(project(":spring-boot-project:spring-boot-http-codec"))

View File

@ -15,7 +15,6 @@ org.springframework.boot.actuate.autoconfigure.data.redis.RedisReactiveHealthCon
org.springframework.boot.actuate.autoconfigure.endpoint.jackson.JacksonEndpointAutoConfiguration org.springframework.boot.actuate.autoconfigure.endpoint.jackson.JacksonEndpointAutoConfiguration
org.springframework.boot.actuate.autoconfigure.endpoint.jmx.JmxEndpointAutoConfiguration org.springframework.boot.actuate.autoconfigure.endpoint.jmx.JmxEndpointAutoConfiguration
org.springframework.boot.actuate.autoconfigure.env.EnvironmentEndpointAutoConfiguration org.springframework.boot.actuate.autoconfigure.env.EnvironmentEndpointAutoConfiguration
org.springframework.boot.actuate.autoconfigure.flyway.FlywayEndpointAutoConfiguration
org.springframework.boot.actuate.autoconfigure.hazelcast.HazelcastHealthContributorAutoConfiguration org.springframework.boot.actuate.autoconfigure.hazelcast.HazelcastHealthContributorAutoConfiguration
org.springframework.boot.actuate.autoconfigure.integration.IntegrationGraphEndpointAutoConfiguration org.springframework.boot.actuate.autoconfigure.integration.IntegrationGraphEndpointAutoConfiguration
org.springframework.boot.actuate.autoconfigure.jdbc.DataSourceHealthContributorAutoConfiguration org.springframework.boot.actuate.autoconfigure.jdbc.DataSourceHealthContributorAutoConfiguration

View File

@ -34,7 +34,6 @@ import org.springframework.boot.data.neo4j.autoconfigure.Neo4jReactiveDataAutoCo
import org.springframework.boot.data.redis.autoconfigure.RedisAutoConfiguration; import org.springframework.boot.data.redis.autoconfigure.RedisAutoConfiguration;
import org.springframework.boot.data.redis.autoconfigure.RedisRepositoriesAutoConfiguration; import org.springframework.boot.data.redis.autoconfigure.RedisRepositoriesAutoConfiguration;
import org.springframework.boot.data.rest.autoconfigure.RepositoryRestMvcAutoConfiguration; import org.springframework.boot.data.rest.autoconfigure.RepositoryRestMvcAutoConfiguration;
import org.springframework.boot.flyway.autoconfigure.FlywayAutoConfiguration;
import org.springframework.boot.hazelcast.autoconfigure.HazelcastAutoConfiguration; import org.springframework.boot.hazelcast.autoconfigure.HazelcastAutoConfiguration;
import org.springframework.boot.liquibase.autoconfigure.LiquibaseAutoConfiguration; import org.springframework.boot.liquibase.autoconfigure.LiquibaseAutoConfiguration;
import org.springframework.boot.mongodb.autoconfigure.MongoAutoConfiguration; import org.springframework.boot.mongodb.autoconfigure.MongoAutoConfiguration;
@ -77,8 +76,8 @@ class WebEndpointsAutoConfigurationIntegrationTests {
.withPropertyValues("management.tracing.enabled=false", "management.defaults.metrics.export.enabled=false"); .withPropertyValues("management.tracing.enabled=false", "management.defaults.metrics.export.enabled=false");
} }
@EnableAutoConfiguration(exclude = { FlywayAutoConfiguration.class, LiquibaseAutoConfiguration.class, @EnableAutoConfiguration(exclude = { LiquibaseAutoConfiguration.class, CassandraAutoConfiguration.class,
CassandraAutoConfiguration.class, CassandraDataAutoConfiguration.class, Neo4jDataAutoConfiguration.class, CassandraDataAutoConfiguration.class, Neo4jDataAutoConfiguration.class,
Neo4jReactiveDataAutoConfiguration.class, MongoAutoConfiguration.class, MongoDataAutoConfiguration.class, Neo4jReactiveDataAutoConfiguration.class, MongoAutoConfiguration.class, MongoDataAutoConfiguration.class,
MongoReactiveAutoConfiguration.class, MongoReactiveDataAutoConfiguration.class, MongoReactiveAutoConfiguration.class, MongoReactiveDataAutoConfiguration.class,
RepositoryRestMvcAutoConfiguration.class, HazelcastAutoConfiguration.class, RedisAutoConfiguration.class, RepositoryRestMvcAutoConfiguration.class, HazelcastAutoConfiguration.class, RedisAutoConfiguration.class,

View File

@ -26,7 +26,7 @@ description = "Spring Boot Actuator AutoConfigure"
dependencies { dependencies {
api(project(":spring-boot-project:spring-boot-actuator")) api(project(":spring-boot-project:spring-boot-actuator"))
api(project(":spring-boot-project:spring-boot-autoconfigure-all")) api(project(":spring-boot-project:spring-boot-autoconfigure"))
optional(project(":spring-boot-project:spring-boot-jersey")) optional(project(":spring-boot-project:spring-boot-jersey"))
optional(project(":spring-boot-project:spring-boot-tomcat")) optional(project(":spring-boot-project:spring-boot-tomcat"))

View File

@ -30,7 +30,7 @@ dependencies {
api(project(":spring-boot-project:spring-boot-jdbc")) api(project(":spring-boot-project:spring-boot-jdbc"))
api("org.flywaydb:flyway-core") api("org.flywaydb:flyway-core")
optional(project(":spring-boot-project:spring-boot-actuator")) optional(project(":spring-boot-project:spring-boot-actuator-autoconfigure"))
optional(project(":spring-boot-project:spring-boot-autoconfigure")) optional(project(":spring-boot-project:spring-boot-autoconfigure"))
optional("org.flywaydb:flyway-database-oracle") optional("org.flywaydb:flyway-database-oracle")
optional("org.flywaydb:flyway-database-postgresql") optional("org.flywaydb:flyway-database-postgresql")

View File

@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.boot.actuate.autoconfigure.flyway; package org.springframework.boot.flyway.actuate.endpoint.autoconfigure;
import org.flywaydb.core.Flyway; import org.flywaydb.core.Flyway;
@ -33,10 +33,10 @@ import org.springframework.context.annotation.Bean;
* {@link EnableAutoConfiguration Auto-configuration} for {@link FlywayEndpoint}. * {@link EnableAutoConfiguration Auto-configuration} for {@link FlywayEndpoint}.
* *
* @author Phillip Webb * @author Phillip Webb
* @since 2.0.0 * @since 4.0.0
*/ */
@AutoConfiguration(after = FlywayAutoConfiguration.class) @AutoConfiguration(after = FlywayAutoConfiguration.class)
@ConditionalOnClass({ Flyway.class, FlywayEndpoint.class }) @ConditionalOnClass({ Flyway.class, ConditionalOnAvailableEndpoint.class })
@ConditionalOnAvailableEndpoint(FlywayEndpoint.class) @ConditionalOnAvailableEndpoint(FlywayEndpoint.class)
public class FlywayEndpointAutoConfiguration { public class FlywayEndpointAutoConfiguration {

View File

@ -15,6 +15,6 @@
*/ */
/** /**
* Auto-configuration for actuator Flyway concerns. * Auto-configuration for Flyway actuator endpoint.
*/ */
package org.springframework.boot.actuate.autoconfigure.flyway; package org.springframework.boot.flyway.actuate.endpoint.autoconfigure;

View File

@ -1 +1,2 @@
org.springframework.boot.flyway.actuate.endpoint.autoconfigure.FlywayEndpointAutoConfiguration
org.springframework.boot.flyway.autoconfigure.FlywayAutoConfiguration org.springframework.boot.flyway.autoconfigure.FlywayAutoConfiguration

View File

@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.boot.actuate.autoconfigure.flyway; package org.springframework.boot.flyway.actuate.endpoint.autoconfigure;
import org.flywaydb.core.Flyway; import org.flywaydb.core.Flyway;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;