Browse Source

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

See gh-46086
pull/46230/head
Andy Wilkinson 8 months ago
parent
commit
e103586cfe
  1. 3
      spring-boot-project/spring-boot-actuator-autoconfigure-all/build.gradle
  2. 1
      spring-boot-project/spring-boot-actuator-autoconfigure-all/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
  3. 5
      spring-boot-project/spring-boot-actuator-autoconfigure-all/src/test/java/org/springframework/boot/actuate/autoconfigure/integrationtest/WebEndpointsAutoConfigurationIntegrationTests.java
  4. 2
      spring-boot-project/spring-boot-actuator-autoconfigure/build.gradle
  5. 2
      spring-boot-project/spring-boot-flyway/build.gradle
  6. 6
      spring-boot-project/spring-boot-flyway/src/main/java/org/springframework/boot/flyway/actuate/endpoint/autoconfigure/FlywayEndpointAutoConfiguration.java
  7. 4
      spring-boot-project/spring-boot-flyway/src/main/java/org/springframework/boot/flyway/actuate/endpoint/autoconfigure/package-info.java
  8. 1
      spring-boot-project/spring-boot-flyway/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
  9. 2
      spring-boot-project/spring-boot-flyway/src/test/java/org/springframework/boot/flyway/actuate/endpoint/autoconfigure/FlywayEndpointAutoConfigurationTests.java

3
spring-boot-project/spring-boot-actuator-autoconfigure-all/build.gradle

@ -35,7 +35,7 @@ configurations.all { @@ -35,7 +35,7 @@ configurations.all {
dependencies {
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.datatype:jackson-datatype-jsr310")
@ -53,7 +53,6 @@ dependencies { @@ -53,7 +53,6 @@ dependencies {
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-redis"))
optional(project(":spring-boot-project:spring-boot-flyway"))
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-codec"))

1
spring-boot-project/spring-boot-actuator-autoconfigure-all/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports

@ -15,7 +15,6 @@ org.springframework.boot.actuate.autoconfigure.data.redis.RedisReactiveHealthCon @@ -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.jmx.JmxEndpointAutoConfiguration
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.integration.IntegrationGraphEndpointAutoConfiguration
org.springframework.boot.actuate.autoconfigure.jdbc.DataSourceHealthContributorAutoConfiguration

5
spring-boot-project/spring-boot-actuator-autoconfigure-all/src/test/java/org/springframework/boot/actuate/autoconfigure/integrationtest/WebEndpointsAutoConfigurationIntegrationTests.java

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

2
spring-boot-project/spring-boot-actuator-autoconfigure/build.gradle

@ -26,7 +26,7 @@ description = "Spring Boot Actuator AutoConfigure" @@ -26,7 +26,7 @@ description = "Spring Boot Actuator AutoConfigure"
dependencies {
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-tomcat"))

2
spring-boot-project/spring-boot-flyway/build.gradle

@ -30,7 +30,7 @@ dependencies { @@ -30,7 +30,7 @@ dependencies {
api(project(":spring-boot-project:spring-boot-jdbc"))
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("org.flywaydb:flyway-database-oracle")
optional("org.flywaydb:flyway-database-postgresql")

6
spring-boot-project/spring-boot-actuator-autoconfigure-all/src/main/java/org/springframework/boot/actuate/autoconfigure/flyway/FlywayEndpointAutoConfiguration.java → spring-boot-project/spring-boot-flyway/src/main/java/org/springframework/boot/flyway/actuate/endpoint/autoconfigure/FlywayEndpointAutoConfiguration.java

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

4
spring-boot-project/spring-boot-actuator-autoconfigure-all/src/main/java/org/springframework/boot/actuate/autoconfigure/flyway/package-info.java → spring-boot-project/spring-boot-flyway/src/main/java/org/springframework/boot/flyway/actuate/endpoint/autoconfigure/package-info.java

@ -15,6 +15,6 @@ @@ -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;

1
spring-boot-project/spring-boot-flyway/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports

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

2
spring-boot-project/spring-boot-actuator-autoconfigure-all/src/test/java/org/springframework/boot/actuate/autoconfigure/flyway/FlywayEndpointAutoConfigurationTests.java → spring-boot-project/spring-boot-flyway/src/test/java/org/springframework/boot/flyway/actuate/endpoint/autoconfigure/FlywayEndpointAutoConfigurationTests.java

@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
* 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.junit.jupiter.api.Test;
Loading…
Cancel
Save