Create spring-boot-flyway module
This commit is contained in:
parent
d53704f942
commit
450a5f8504
|
@ -51,6 +51,7 @@ include "spring-boot-project:spring-boot-dependencies"
|
|||
include "spring-boot-project:spring-boot-devtools"
|
||||
include "spring-boot-project:spring-boot-docker-compose"
|
||||
include "spring-boot-project:spring-boot-docs"
|
||||
include "spring-boot-project:spring-boot-flyway"
|
||||
include "spring-boot-project:spring-boot-jackson"
|
||||
include "spring-boot-project:spring-boot-jdbc"
|
||||
include "spring-boot-project:spring-boot-jetty"
|
||||
|
|
|
@ -20,6 +20,7 @@ dependencies {
|
|||
optional(project(":spring-boot-project:spring-boot-activemq"))
|
||||
optional(project(":spring-boot-project:spring-boot-amqp"))
|
||||
optional(project(":spring-boot-project:spring-boot-artemis"))
|
||||
optional(project(":spring-boot-project:spring-boot-flyway"))
|
||||
optional(project(":spring-boot-project:spring-boot-jackson"))
|
||||
optional(project(":spring-boot-project:spring-boot-jdbc"))
|
||||
optional(project(":spring-boot-project:spring-boot-jetty"))
|
||||
|
@ -101,7 +102,6 @@ dependencies {
|
|||
optional("org.elasticsearch.client:elasticsearch-rest-client") {
|
||||
exclude group: "commons-logging", module: "commons-logging"
|
||||
}
|
||||
optional("org.flywaydb:flyway-core")
|
||||
optional("org.glassfish.jersey.core:jersey-server")
|
||||
optional("org.glassfish.jersey.containers:jersey-container-servlet-core")
|
||||
optional("org.glassfish.jersey.ext:jersey-micrometer")
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2024 the original author or authors.
|
||||
* Copyright 2012-2025 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -25,7 +25,7 @@ import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
|
|||
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
|
||||
import org.springframework.boot.autoconfigure.flyway.FlywayAutoConfiguration;
|
||||
import org.springframework.boot.flyway.autoconfigure.FlywayAutoConfiguration;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ import org.junit.jupiter.api.Test;
|
|||
import org.springframework.boot.actuate.autoconfigure.endpoint.web.documentation.MockMvcEndpointDocumentationTests;
|
||||
import org.springframework.boot.actuate.flyway.FlywayEndpoint;
|
||||
import org.springframework.boot.autoconfigure.ImportAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.flyway.FlywayAutoConfiguration;
|
||||
import org.springframework.boot.flyway.autoconfigure.FlywayAutoConfiguration;
|
||||
import org.springframework.boot.jdbc.EmbeddedDatabaseConnection;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2024 the original author or authors.
|
||||
* Copyright 2012-2025 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -34,12 +34,12 @@ import org.springframework.boot.autoconfigure.data.neo4j.Neo4jRepositoriesAutoCo
|
|||
import org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.data.redis.RedisRepositoriesAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.data.rest.RepositoryRestMvcAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.flyway.FlywayAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.hazelcast.HazelcastAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.liquibase.LiquibaseAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.mongo.MongoAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.mongo.MongoReactiveAutoConfiguration;
|
||||
import org.springframework.boot.context.annotation.UserConfigurations;
|
||||
import org.springframework.boot.flyway.autoconfigure.FlywayAutoConfiguration;
|
||||
import org.springframework.boot.test.context.runner.ReactiveWebApplicationContextRunner;
|
||||
import org.springframework.boot.test.context.runner.WebApplicationContextRunner;
|
||||
import org.springframework.boot.testsupport.classpath.ClassPathExclusions;
|
||||
|
|
|
@ -24,6 +24,7 @@ dependencies {
|
|||
dockerTestImplementation("org.testcontainers:testcontainers")
|
||||
|
||||
optional(project(":spring-boot-project:spring-boot-activemq"))
|
||||
optional(project(":spring-boot-project:spring-boot-flyway"))
|
||||
optional(project(":spring-boot-project:spring-boot-jdbc"))
|
||||
optional(project(":spring-boot-project:spring-boot-jetty"))
|
||||
optional(project(":spring-boot-project:spring-boot-jsonb"))
|
||||
|
@ -62,7 +63,6 @@ dependencies {
|
|||
optional("org.elasticsearch.client:elasticsearch-rest-client") {
|
||||
exclude(group: "commons-logging", module: "commons-logging")
|
||||
}
|
||||
optional("org.flywaydb:flyway-core")
|
||||
optional("org.glassfish.jersey.core:jersey-server")
|
||||
optional("org.glassfish.jersey.containers:jersey-container-servlet-core")
|
||||
optional("org.hibernate.validator:hibernate-validator")
|
||||
|
|
|
@ -22,8 +22,8 @@ import org.junit.jupiter.api.Test;
|
|||
|
||||
import org.springframework.boot.actuate.flyway.FlywayEndpoint.FlywayDescriptor;
|
||||
import org.springframework.boot.autoconfigure.AutoConfigurations;
|
||||
import org.springframework.boot.autoconfigure.flyway.FlywayAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.flyway.FlywayMigrationStrategy;
|
||||
import org.springframework.boot.flyway.autoconfigure.FlywayAutoConfiguration;
|
||||
import org.springframework.boot.flyway.autoconfigure.FlywayMigrationStrategy;
|
||||
import org.springframework.boot.jdbc.autoconfigure.EmbeddedDataSourceConfiguration;
|
||||
import org.springframework.boot.test.context.runner.ApplicationContextRunner;
|
||||
import org.springframework.boot.testsupport.classpath.resources.WithResource;
|
||||
|
|
|
@ -46,7 +46,6 @@ dependencies {
|
|||
optional("org.apache.groovy:groovy-xml")
|
||||
optional("org.crac:crac")
|
||||
optional("org.eclipse.jetty:jetty-client")
|
||||
optional("org.flywaydb:flyway-core")
|
||||
optional("org.hamcrest:hamcrest-library")
|
||||
optional("org.hibernate.orm:hibernate-core")
|
||||
optional("org.hibernate.validator:hibernate-validator")
|
||||
|
|
|
@ -12,7 +12,6 @@ org.springframework.boot.liquibase.LiquibaseChangelogMissingFailureAnalyzer
|
|||
|
||||
# Database Initializer Detectors
|
||||
org.springframework.boot.sql.init.dependency.DatabaseInitializerDetector=\
|
||||
org.springframework.boot.flyway.FlywayDatabaseInitializerDetector,\
|
||||
org.springframework.boot.liquibase.LiquibaseDatabaseInitializerDetector,\
|
||||
org.springframework.boot.orm.jpa.JpaDatabaseInitializerDetector,\
|
||||
org.springframework.boot.r2dbc.init.R2dbcScriptDatabaseInitializerDetector
|
||||
|
|
|
@ -44,6 +44,7 @@ dependencies {
|
|||
|
||||
optional(project(":spring-boot-project:spring-boot-activemq"))
|
||||
optional(project(":spring-boot-project:spring-boot-artemis"))
|
||||
optional(project(":spring-boot-project:spring-boot-flyway"))
|
||||
optional(project(":spring-boot-project:spring-boot-jackson"))
|
||||
optional(project(":spring-boot-project:spring-boot-jdbc"))
|
||||
optional(project(":spring-boot-project:spring-boot-jsonb"))
|
||||
|
@ -126,10 +127,6 @@ dependencies {
|
|||
optional("org.elasticsearch.client:elasticsearch-rest-client-sniffer") {
|
||||
exclude group: "commons-logging", module: "commons-logging"
|
||||
}
|
||||
optional("org.flywaydb:flyway-core")
|
||||
optional("org.flywaydb:flyway-database-postgresql")
|
||||
optional("org.flywaydb:flyway-database-oracle")
|
||||
optional("org.flywaydb:flyway-sqlserver")
|
||||
optional("org.freemarker:freemarker")
|
||||
optional("org.glassfish.jersey.containers:jersey-container-servlet-core")
|
||||
optional("org.glassfish.jersey.containers:jersey-container-servlet")
|
||||
|
|
|
@ -33,7 +33,6 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
|
|||
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnSingleCandidate;
|
||||
import org.springframework.boot.autoconfigure.flyway.FlywayAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.liquibase.LiquibaseAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.sql.init.OnDatabaseInitializationCondition;
|
||||
|
@ -58,7 +57,7 @@ import org.springframework.transaction.PlatformTransactionManager;
|
|||
* @since 2.0.0
|
||||
*/
|
||||
@AutoConfiguration(after = { DataSourceAutoConfiguration.class, HibernateJpaAutoConfiguration.class,
|
||||
LiquibaseAutoConfiguration.class, FlywayAutoConfiguration.class })
|
||||
LiquibaseAutoConfiguration.class })
|
||||
@ConditionalOnClass({ Scheduler.class, SchedulerFactoryBean.class, PlatformTransactionManager.class })
|
||||
@EnableConfigurationProperties(QuartzProperties.class)
|
||||
public class QuartzAutoConfiguration {
|
||||
|
|
|
@ -759,160 +759,6 @@
|
|||
"reason": "Reactive Elasticsearch client no longer uses WebClient."
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "spring.flyway.baseline-migration-prefix",
|
||||
"defaultValue": "B",
|
||||
"description": "Filename prefix for baseline migrations. Requires Flyway Teams.",
|
||||
"deprecation": {
|
||||
"level": "error",
|
||||
"reason": "Removed in Flyway 9.0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "spring.flyway.check-location",
|
||||
"type": "java.lang.Boolean",
|
||||
"deprecation": {
|
||||
"replacement": "spring.flyway.fail-on-missing-locations",
|
||||
"level": "error"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "spring.flyway.cherry-pick",
|
||||
"description": "Migrations that Flyway should consider when migrating or undoing. When empty all available migrations are considered. Requires Flyway Teams.",
|
||||
"deprecation": {
|
||||
"level": "error",
|
||||
"reason": "Removed in Flyway 10"
|
||||
}
|
||||
},{
|
||||
"name": "spring.flyway.community-db-support-enabled",
|
||||
"defaultValue": false
|
||||
},
|
||||
{
|
||||
"name": "spring.flyway.dry-run-output",
|
||||
"type": "java.io.OutputStream",
|
||||
"deprecation": {
|
||||
"level": "error",
|
||||
"reason": "Flyway Teams only."
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "spring.flyway.error-handlers",
|
||||
"type": "org.flywaydb.core.api.errorhandler.ErrorHandler[]",
|
||||
"deprecation": {
|
||||
"level": "error",
|
||||
"reason": "Flyway Teams only."
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "spring.flyway.ignore-future-migrations",
|
||||
"type": "java.lang.Boolean",
|
||||
"description": "Whether to ignore future migrations when reading the schema history table.",
|
||||
"deprecation": {
|
||||
"level": "error",
|
||||
"reason": "Removed in Flyway 9.0",
|
||||
"replacement": "spring.flyway.ignore-migration-patterns"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "spring.flyway.ignore-ignored-migrations",
|
||||
"type": "java.lang.Boolean",
|
||||
"description": "Whether to ignore ignored migrations when reading the schema history table.",
|
||||
"deprecation": {
|
||||
"level": "error",
|
||||
"reason": "Removed in Flyway 9.0",
|
||||
"replacement": "spring.flyway.ignore-migration-patterns"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "spring.flyway.ignore-missing-migrations",
|
||||
"type": "java.lang.Boolean",
|
||||
"description": "Whether to ignore missing migrations when reading the schema history table.",
|
||||
"deprecation": {
|
||||
"level": "error",
|
||||
"reason": "Removed in Flyway 9.0",
|
||||
"replacement": "spring.flyway.ignore-migration-patterns"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "spring.flyway.ignore-pending-migrations",
|
||||
"type": "java.lang.Boolean",
|
||||
"description": "Whether to ignore pending migrations when reading the schema history table.",
|
||||
"deprecation": {
|
||||
"level": "error",
|
||||
"reason": "Removed in Flyway 9.0",
|
||||
"replacement": "spring.flyway.ignore-migration-patterns"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "spring.flyway.license-key",
|
||||
"description": "License key for Flyway Teams.",
|
||||
"deprecation": {
|
||||
"level": "error",
|
||||
"reason": "Removed in Flyway 10"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "spring.flyway.locations",
|
||||
"sourceType": "org.springframework.boot.autoconfigure.flyway.FlywayProperties",
|
||||
"defaultValue": [
|
||||
"classpath:db/migration"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "spring.flyway.oracle-kerberos-config-file",
|
||||
"type": "java.lang.String",
|
||||
"deprecation": {
|
||||
"replacement": "spring.flyway.kerberos-config-file",
|
||||
"level": "error"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "spring.flyway.sql-migration-suffix",
|
||||
"type": "java.lang.String",
|
||||
"deprecation": {
|
||||
"replacement": "spring.flyway.sql-migration-suffixes",
|
||||
"level": "error"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "spring.flyway.sql-migration-suffixes",
|
||||
"sourceType": "org.springframework.boot.autoconfigure.flyway.FlywayProperties",
|
||||
"defaultValue": [
|
||||
".sql"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "spring.flyway.undo-sql-migration-prefix",
|
||||
"type": "java.lang.String",
|
||||
"deprecation": {
|
||||
"level": "error",
|
||||
"reason": "Removed in Flyway 10"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "spring.flyway.vault-secrets",
|
||||
"type": "java.util.List<java.lang.String>",
|
||||
"deprecation": {
|
||||
"level": "error",
|
||||
"reason": "Removed in the open source release of Flyway 7.12."
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "spring.flyway.vault-token",
|
||||
"type": "java.lang.String",
|
||||
"deprecation": {
|
||||
"level": "error",
|
||||
"reason": "Removed in the open source release of Flyway 7.12."
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "spring.flyway.vault-url",
|
||||
"type": "java.lang.String",
|
||||
"deprecation": {
|
||||
"level": "error",
|
||||
"reason": "Removed in the open source release of Flyway 7.12."
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "spring.freemarker.allow-request-override",
|
||||
"description": "Whether HttpServletRequest attributes are allowed to override (hide) controller generated model attributes of the same name. Only supported with Spring MVC."
|
||||
|
|
|
@ -25,10 +25,6 @@ org.springframework.boot.autoconfigure.mustache.MustacheTemplateAvailabilityProv
|
|||
org.springframework.boot.autoconfigure.thymeleaf.ThymeleafTemplateAvailabilityProvider,\
|
||||
org.springframework.boot.autoconfigure.web.servlet.JspTemplateAvailabilityProvider
|
||||
|
||||
# DataSource Initializer Detectors
|
||||
org.springframework.boot.sql.init.dependency.DatabaseInitializerDetector=\
|
||||
org.springframework.boot.autoconfigure.flyway.FlywayMigrationInitializerDatabaseInitializerDetector
|
||||
|
||||
# Depends on Database Initialization Detectors
|
||||
org.springframework.boot.sql.init.dependency.DependsOnDatabaseInitializationDetector=\
|
||||
org.springframework.boot.autoconfigure.batch.JobRepositoryDependsOnDatabaseInitializationDetector,\
|
||||
|
|
|
@ -1,6 +1,3 @@
|
|||
org.springframework.aot.hint.RuntimeHintsRegistrar=\
|
||||
org.springframework.boot.autoconfigure.freemarker.FreeMarkerTemplateAvailabilityProvider$FreeMarkerTemplateAvailabilityRuntimeHints,\
|
||||
org.springframework.boot.autoconfigure.groovy.template.GroovyTemplateAvailabilityProvider$GroovyTemplateAvailabilityRuntimeHints
|
||||
|
||||
org.springframework.beans.factory.aot.BeanRegistrationAotProcessor=\
|
||||
org.springframework.boot.autoconfigure.flyway.ResourceProviderCustomizerBeanRegistrationAotProcessor
|
||||
|
|
|
@ -36,7 +36,6 @@ org.springframework.boot.autoconfigure.data.web.SpringDataWebAutoConfiguration
|
|||
org.springframework.boot.autoconfigure.elasticsearch.ElasticsearchClientAutoConfiguration
|
||||
org.springframework.boot.autoconfigure.elasticsearch.ElasticsearchRestClientAutoConfiguration
|
||||
org.springframework.boot.autoconfigure.elasticsearch.ReactiveElasticsearchClientAutoConfiguration
|
||||
org.springframework.boot.autoconfigure.flyway.FlywayAutoConfiguration
|
||||
org.springframework.boot.autoconfigure.freemarker.FreeMarkerAutoConfiguration
|
||||
org.springframework.boot.autoconfigure.graphql.GraphQlAutoConfiguration
|
||||
org.springframework.boot.autoconfigure.graphql.data.GraphQlReactiveQueryByExampleAutoConfiguration
|
||||
|
|
|
@ -60,9 +60,9 @@ import org.springframework.boot.autoconfigure.AutoConfigurations;
|
|||
import org.springframework.boot.autoconfigure.TestAutoConfigurationPackage;
|
||||
import org.springframework.boot.autoconfigure.batch.BatchAutoConfiguration.SpringBootBatchConfiguration;
|
||||
import org.springframework.boot.autoconfigure.batch.domain.City;
|
||||
import org.springframework.boot.autoconfigure.flyway.FlywayAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.liquibase.LiquibaseAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration;
|
||||
import org.springframework.boot.flyway.autoconfigure.FlywayAutoConfiguration;
|
||||
import org.springframework.boot.jdbc.DataSourceBuilder;
|
||||
import org.springframework.boot.jdbc.autoconfigure.DataSourceAutoConfiguration;
|
||||
import org.springframework.boot.jdbc.autoconfigure.DataSourceTransactionManagerAutoConfiguration;
|
||||
|
|
|
@ -39,7 +39,6 @@ import reactor.core.publisher.Mono;
|
|||
import org.springframework.beans.DirectFieldAccessor;
|
||||
import org.springframework.beans.PropertyAccessorFactory;
|
||||
import org.springframework.boot.autoconfigure.AutoConfigurations;
|
||||
import org.springframework.boot.autoconfigure.flyway.FlywayAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.integration.IntegrationAutoConfiguration.IntegrationComponentScanConfiguration;
|
||||
import org.springframework.boot.autoconfigure.jmx.JmxAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.rsocket.RSocketMessagingAutoConfiguration;
|
||||
|
@ -49,6 +48,7 @@ import org.springframework.boot.autoconfigure.rsocket.RSocketStrategiesAutoConfi
|
|||
import org.springframework.boot.autoconfigure.task.TaskSchedulingAutoConfiguration;
|
||||
import org.springframework.boot.context.annotation.UserConfigurations;
|
||||
import org.springframework.boot.context.properties.source.MutuallyExclusiveConfigurationPropertiesException;
|
||||
import org.springframework.boot.flyway.autoconfigure.FlywayAutoConfiguration;
|
||||
import org.springframework.boot.jdbc.autoconfigure.DataSourceAutoConfiguration;
|
||||
import org.springframework.boot.jdbc.autoconfigure.DataSourceTransactionManagerAutoConfiguration;
|
||||
import org.springframework.boot.jdbc.autoconfigure.EmbeddedDataSourceConfiguration;
|
||||
|
|
|
@ -58,12 +58,12 @@ import org.springframework.beans.factory.BeanCreationException;
|
|||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.autoconfigure.AutoConfigurations;
|
||||
import org.springframework.boot.autoconfigure.TestAutoConfigurationPackage;
|
||||
import org.springframework.boot.autoconfigure.flyway.FlywayAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.liquibase.LiquibaseAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfigurationTests.JpaUsingApplicationListenerConfiguration.EventCapturingApplicationListener;
|
||||
import org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaConfiguration.HibernateRuntimeHints;
|
||||
import org.springframework.boot.autoconfigure.orm.jpa.mapping.NonAnnotatedEntity;
|
||||
import org.springframework.boot.autoconfigure.orm.jpa.test.City;
|
||||
import org.springframework.boot.flyway.autoconfigure.FlywayAutoConfiguration;
|
||||
import org.springframework.boot.jdbc.autoconfigure.DataSourceTransactionManagerAutoConfiguration;
|
||||
import org.springframework.boot.jdbc.autoconfigure.XADataSourceAutoConfiguration;
|
||||
import org.springframework.boot.orm.jpa.hibernate.SpringImplicitNamingStrategy;
|
||||
|
|
|
@ -45,8 +45,8 @@ import org.quartz.simpl.RAMJobStore;
|
|||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.autoconfigure.AutoConfigurations;
|
||||
import org.springframework.boot.autoconfigure.flyway.FlywayAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.liquibase.LiquibaseAutoConfiguration;
|
||||
import org.springframework.boot.flyway.autoconfigure.FlywayAutoConfiguration;
|
||||
import org.springframework.boot.jdbc.autoconfigure.DataSourceAutoConfiguration;
|
||||
import org.springframework.boot.jdbc.autoconfigure.DataSourceProperties;
|
||||
import org.springframework.boot.jdbc.autoconfigure.DataSourceTransactionManagerAutoConfiguration;
|
||||
|
|
|
@ -26,9 +26,9 @@ import org.junit.jupiter.api.Test;
|
|||
|
||||
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
|
||||
import org.springframework.boot.autoconfigure.AutoConfigurations;
|
||||
import org.springframework.boot.autoconfigure.flyway.FlywayAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.liquibase.LiquibaseAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.web.ServerProperties;
|
||||
import org.springframework.boot.flyway.autoconfigure.FlywayAutoConfiguration;
|
||||
import org.springframework.boot.jdbc.autoconfigure.DataSourceAutoConfiguration;
|
||||
import org.springframework.boot.jdbc.autoconfigure.DataSourceTransactionManagerAutoConfiguration;
|
||||
import org.springframework.boot.jdbc.autoconfigure.JdbcTemplateAutoConfiguration;
|
||||
|
|
|
@ -2024,6 +2024,7 @@ bom {
|
|||
"spring-boot-configuration-processor",
|
||||
"spring-boot-devtools",
|
||||
"spring-boot-docker-compose",
|
||||
"spring-boot-flyway",
|
||||
"spring-boot-jackson",
|
||||
"spring-boot-jarmode-tools",
|
||||
"spring-boot-jdbc",
|
||||
|
|
|
@ -12,6 +12,7 @@ dependencies {
|
|||
api(project(":spring-boot-project:spring-boot-all"))
|
||||
|
||||
dockerTestImplementation(project(":spring-boot-project:spring-boot-jdbc"))
|
||||
dockerTestImplementation(project(":spring-boot-project:spring-boot-flyway"))
|
||||
dockerTestImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support-docker"))
|
||||
dockerTestImplementation("com.hazelcast:hazelcast")
|
||||
dockerTestImplementation("com.redis:testcontainers-redis")
|
||||
|
@ -36,6 +37,7 @@ dependencies {
|
|||
optional(project(":spring-boot-project:spring-boot-artemis"))
|
||||
optional(project(":spring-boot-project:spring-boot-autoconfigure-all"))
|
||||
optional(project(":spring-boot-project:spring-boot-actuator-autoconfigure"))
|
||||
optional(project(":spring-boot-project:spring-boot-flyway"))
|
||||
optional(project(":spring-boot-project:spring-boot-jdbc"))
|
||||
optional("com.hazelcast:hazelcast")
|
||||
optional("io.r2dbc:r2dbc-spi")
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2024 the original author or authors.
|
||||
* Copyright 2012-2025 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -16,8 +16,8 @@
|
|||
|
||||
package org.springframework.boot.docker.compose.service.connection.flyway;
|
||||
|
||||
import org.springframework.boot.autoconfigure.flyway.FlywayConnectionDetails;
|
||||
import org.springframework.boot.docker.compose.service.connection.test.DockerComposeTest;
|
||||
import org.springframework.boot.flyway.autoconfigure.FlywayConnectionDetails;
|
||||
import org.springframework.boot.testsupport.container.TestImage;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2023 the original author or authors.
|
||||
* Copyright 2012-2025 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -16,8 +16,8 @@
|
|||
|
||||
package org.springframework.boot.docker.compose.service.connection.flyway;
|
||||
|
||||
import org.springframework.boot.autoconfigure.flyway.FlywayConnectionDetails;
|
||||
import org.springframework.boot.autoconfigure.service.connection.ConnectionDetailsFactory;
|
||||
import org.springframework.boot.flyway.autoconfigure.FlywayConnectionDetails;
|
||||
import org.springframework.boot.jdbc.autoconfigure.JdbcConnectionDetails;
|
||||
|
||||
/**
|
||||
|
|
|
@ -60,6 +60,7 @@ dependencies {
|
|||
autoConfiguration(project(path: ":spring-boot-project:spring-boot-autoconfigure", configuration: "autoConfigurationMetadata"))
|
||||
autoConfiguration(project(path: ":spring-boot-project:spring-boot-autoconfigure-all", configuration: "autoConfigurationMetadata"))
|
||||
autoConfiguration(project(path: ":spring-boot-project:spring-boot-devtools", configuration: "autoConfigurationMetadata"))
|
||||
autoConfiguration(project(path: ":spring-boot-project:spring-boot-flyway", configuration: "autoConfigurationMetadata"))
|
||||
autoConfiguration(project(path: ":spring-boot-project:spring-boot-jackson", configuration: "autoConfigurationMetadata"))
|
||||
autoConfiguration(project(path: ":spring-boot-project:spring-boot-jdbc", configuration: "autoConfigurationMetadata"))
|
||||
autoConfiguration(project(path: ":spring-boot-project:spring-boot-jetty", configuration: "autoConfigurationMetadata"))
|
||||
|
@ -82,6 +83,7 @@ dependencies {
|
|||
configurationProperties(project(path: ":spring-boot-project:spring-boot-autoconfigure-all", configuration: "configurationPropertiesMetadata"))
|
||||
configurationProperties(project(path: ":spring-boot-project:spring-boot-devtools", configuration: "configurationPropertiesMetadata"))
|
||||
configurationProperties(project(path: ":spring-boot-project:spring-boot-docker-compose", configuration: "configurationPropertiesMetadata"))
|
||||
configurationProperties(project(path: ":spring-boot-project:spring-boot-flyway", configuration: "configurationPropertiesMetadata"))
|
||||
configurationProperties(project(path: ":spring-boot-project:spring-boot-jackson", configuration: "configurationPropertiesMetadata"))
|
||||
configurationProperties(project(path: ":spring-boot-project:spring-boot-jdbc", configuration: "configurationPropertiesMetadata"))
|
||||
configurationProperties(project(path: ":spring-boot-project:spring-boot-jetty", configuration: "configurationPropertiesMetadata"))
|
||||
|
|
|
@ -0,0 +1,36 @@
|
|||
plugins {
|
||||
id "java-library"
|
||||
id "org.springframework.boot.auto-configuration"
|
||||
id "org.springframework.boot.configuration-properties"
|
||||
id "org.springframework.boot.deployed"
|
||||
id "org.springframework.boot.optional-dependencies"
|
||||
}
|
||||
|
||||
description = "Spring Boot Flyway"
|
||||
|
||||
dependencies {
|
||||
api(project(":spring-boot-project:spring-boot"))
|
||||
api(project(":spring-boot-project:spring-boot-jdbc"))
|
||||
api("org.flywaydb:flyway-core")
|
||||
|
||||
optional(project(":spring-boot-project:spring-boot-autoconfigure"))
|
||||
optional("org.flywaydb:flyway-database-oracle")
|
||||
optional("org.flywaydb:flyway-database-postgresql")
|
||||
optional("org.flywaydb:flyway-sqlserver")
|
||||
|
||||
testImplementation(project(":spring-boot-project:spring-boot-test"))
|
||||
testImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support"))
|
||||
testImplementation("jakarta.persistence:jakarta.persistence-api")
|
||||
testImplementation("org.hibernate.orm:hibernate-core")
|
||||
testImplementation("org.hsqldb:hsqldb")
|
||||
testImplementation("org.jooq:jooq") {
|
||||
exclude group: "javax.xml.bind", module: "jaxb-api"
|
||||
}
|
||||
testImplementation("org.postgresql:postgresql")
|
||||
testImplementation("org.springframework:spring-orm")
|
||||
|
||||
testRuntimeOnly("ch.qos.logback:logback-classic")
|
||||
testRuntimeOnly("com.h2database:h2")
|
||||
testRuntimeOnly("com.zaxxer:HikariCP")
|
||||
testRuntimeOnly("org.flywaydb:flyway-database-hsqldb")
|
||||
}
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2021 the original author or authors.
|
||||
* Copyright 2012-2025 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.autoconfigure.flyway;
|
||||
package org.springframework.boot.flyway.autoconfigure;
|
||||
|
||||
import java.sql.DatabaseMetaData;
|
||||
import java.time.Duration;
|
||||
|
@ -50,20 +50,18 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnBooleanProp
|
|||
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||
import org.springframework.boot.autoconfigure.flyway.FlywayAutoConfiguration.FlywayAutoConfigurationRuntimeHints;
|
||||
import org.springframework.boot.autoconfigure.flyway.FlywayAutoConfiguration.FlywayDataSourceCondition;
|
||||
import org.springframework.boot.autoconfigure.flyway.FlywayProperties.Oracle;
|
||||
import org.springframework.boot.autoconfigure.flyway.FlywayProperties.Postgresql;
|
||||
import org.springframework.boot.autoconfigure.flyway.FlywayProperties.Sqlserver;
|
||||
import org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration;
|
||||
import org.springframework.boot.context.properties.ConfigurationPropertiesBinding;
|
||||
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
||||
import org.springframework.boot.context.properties.PropertyMapper;
|
||||
import org.springframework.boot.flyway.autoconfigure.FlywayAutoConfiguration.FlywayAutoConfigurationRuntimeHints;
|
||||
import org.springframework.boot.flyway.autoconfigure.FlywayAutoConfiguration.FlywayDataSourceCondition;
|
||||
import org.springframework.boot.flyway.autoconfigure.FlywayProperties.Oracle;
|
||||
import org.springframework.boot.flyway.autoconfigure.FlywayProperties.Postgresql;
|
||||
import org.springframework.boot.flyway.autoconfigure.FlywayProperties.Sqlserver;
|
||||
import org.springframework.boot.jdbc.DataSourceBuilder;
|
||||
import org.springframework.boot.jdbc.DatabaseDriver;
|
||||
import org.springframework.boot.jdbc.autoconfigure.DataSourceAutoConfiguration;
|
||||
import org.springframework.boot.jdbc.autoconfigure.JdbcConnectionDetails;
|
||||
import org.springframework.boot.jdbc.autoconfigure.JdbcTemplateAutoConfiguration;
|
||||
import org.springframework.boot.sql.init.dependency.DatabaseInitializationDependencyConfigurer;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Conditional;
|
||||
|
@ -100,10 +98,9 @@ import org.springframework.util.function.SingletonSupplier;
|
|||
* @author Chris Bono
|
||||
* @author Moritz Halbritter
|
||||
* @author Andy Wilkinson
|
||||
* @since 1.1.0
|
||||
* @since 4.0.0
|
||||
*/
|
||||
@AutoConfiguration(after = { DataSourceAutoConfiguration.class, JdbcTemplateAutoConfiguration.class,
|
||||
HibernateJpaAutoConfiguration.class })
|
||||
@AutoConfiguration(after = DataSourceAutoConfiguration.class)
|
||||
@ConditionalOnClass(Flyway.class)
|
||||
@Conditional(FlywayDataSourceCondition.class)
|
||||
@ConditionalOnBooleanProperty(name = "spring.flyway.enabled", matchIfMissing = true)
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2019 the original author or authors.
|
||||
* Copyright 2012-2025 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.autoconfigure.flyway;
|
||||
package org.springframework.boot.flyway.autoconfigure;
|
||||
|
||||
import org.flywaydb.core.api.configuration.FluentConfiguration;
|
||||
|
||||
|
@ -23,7 +23,7 @@ import org.flywaydb.core.api.configuration.FluentConfiguration;
|
|||
* configuration.
|
||||
*
|
||||
* @author Stephane Nicoll
|
||||
* @since 2.1.0
|
||||
* @since 4.0.0
|
||||
*/
|
||||
@FunctionalInterface
|
||||
public interface FlywayConfigurationCustomizer {
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2023 the original author or authors.
|
||||
* Copyright 2012-2025 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.autoconfigure.flyway;
|
||||
package org.springframework.boot.flyway.autoconfigure;
|
||||
|
||||
import org.springframework.boot.autoconfigure.service.connection.ConnectionDetails;
|
||||
import org.springframework.boot.jdbc.DatabaseDriver;
|
||||
|
@ -23,7 +23,7 @@ import org.springframework.boot.jdbc.DatabaseDriver;
|
|||
* Details required for Flyway to establish a connection to an SQL service using JDBC.
|
||||
*
|
||||
* @author Andy Wilkinson
|
||||
* @since 3.1.0
|
||||
* @since 4.0.0
|
||||
*/
|
||||
public interface FlywayConnectionDetails extends ConnectionDetails {
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2019 the original author or authors.
|
||||
* Copyright 2012-2025 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.autoconfigure.flyway;
|
||||
package org.springframework.boot.flyway.autoconfigure;
|
||||
|
||||
import java.lang.annotation.Documented;
|
||||
import java.lang.annotation.ElementType;
|
||||
|
@ -29,7 +29,7 @@ import org.springframework.beans.factory.annotation.Qualifier;
|
|||
* data source, the other (main) one would normally be marked as {@code @Primary}.
|
||||
*
|
||||
* @author Dave Syer
|
||||
* @since 1.1.0
|
||||
* @since 4.0.0
|
||||
*/
|
||||
@Target({ ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER, ElementType.TYPE, ElementType.ANNOTATION_TYPE })
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.autoconfigure.flyway;
|
||||
package org.springframework.boot.flyway.autoconfigure;
|
||||
|
||||
import org.flywaydb.core.Flyway;
|
||||
|
||||
|
@ -27,7 +27,7 @@ import org.springframework.util.Assert;
|
|||
* {@link FlywayMigrationStrategy}.
|
||||
*
|
||||
* @author Phillip Webb
|
||||
* @since 1.3.0
|
||||
* @since 4.0.0
|
||||
*/
|
||||
public class FlywayMigrationInitializer implements InitializingBean, Ordered {
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2021 the original author or authors.
|
||||
* Copyright 2012-2025 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.autoconfigure.flyway;
|
||||
package org.springframework.boot.flyway.autoconfigure;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.Set;
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2019 the original author or authors.
|
||||
* Copyright 2012-2025 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.autoconfigure.flyway;
|
||||
package org.springframework.boot.flyway.autoconfigure;
|
||||
|
||||
import org.flywaydb.core.Flyway;
|
||||
|
||||
|
@ -24,7 +24,7 @@ import org.flywaydb.core.Flyway;
|
|||
*
|
||||
* @author Andreas Ahlenstorf
|
||||
* @author Phillip Webb
|
||||
* @since 1.3.0
|
||||
* @since 4.0.0
|
||||
*/
|
||||
@FunctionalInterface
|
||||
public interface FlywayMigrationStrategy {
|
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.autoconfigure.flyway;
|
||||
package org.springframework.boot.flyway.autoconfigure;
|
||||
|
||||
import java.io.File;
|
||||
import java.nio.charset.Charset;
|
||||
|
@ -38,7 +38,7 @@ import org.springframework.boot.convert.DurationUnit;
|
|||
* @author Eddú Meléndez
|
||||
* @author Stephane Nicoll
|
||||
* @author Chris Bono
|
||||
* @since 1.1.0
|
||||
* @since 4.0.0
|
||||
*/
|
||||
@ConfigurationProperties("spring.flyway")
|
||||
public class FlywayProperties {
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2023 the original author or authors.
|
||||
* Copyright 2012-2025 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.autoconfigure.flyway;
|
||||
package org.springframework.boot.flyway.autoconfigure;
|
||||
|
||||
import java.util.stream.StreamSupport;
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2024 the original author or authors.
|
||||
* Copyright 2012-2025 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.autoconfigure.flyway;
|
||||
package org.springframework.boot.flyway.autoconfigure;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.UncheckedIOException;
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2024 the original author or authors.
|
||||
* Copyright 2012-2025 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.autoconfigure.flyway;
|
||||
package org.springframework.boot.flyway.autoconfigure;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2022 the original author or authors.
|
||||
* Copyright 2012-2025 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.autoconfigure.flyway;
|
||||
package org.springframework.boot.flyway.autoconfigure;
|
||||
|
||||
import org.flywaydb.core.api.configuration.FluentConfiguration;
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2023 the original author or authors.
|
||||
* Copyright 2012-2025 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.autoconfigure.flyway;
|
||||
package org.springframework.boot.flyway.autoconfigure;
|
||||
|
||||
import javax.lang.model.element.Modifier;
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2019 the original author or authors.
|
||||
* Copyright 2012-2025 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -17,4 +17,4 @@
|
|||
/**
|
||||
* Auto-configuration for Flyway.
|
||||
*/
|
||||
package org.springframework.boot.autoconfigure.flyway;
|
||||
package org.springframework.boot.flyway.autoconfigure;
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2021 the original author or authors.
|
||||
* Copyright 2012-2025 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
|
@ -0,0 +1,4 @@
|
|||
# Database Initializer Detectors
|
||||
org.springframework.boot.sql.init.dependency.DatabaseInitializerDetector=\
|
||||
org.springframework.boot.flyway.FlywayDatabaseInitializerDetector,\
|
||||
org.springframework.boot.flyway.autoconfigure.FlywayMigrationInitializerDatabaseInitializerDetector
|
|
@ -0,0 +1,158 @@
|
|||
{
|
||||
"properties": [
|
||||
{
|
||||
"name": "spring.flyway.baseline-migration-prefix",
|
||||
"defaultValue": "B",
|
||||
"description": "Filename prefix for baseline migrations. Requires Flyway Teams.",
|
||||
"deprecation": {
|
||||
"level": "error",
|
||||
"reason": "Removed in Flyway 9.0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "spring.flyway.check-location",
|
||||
"type": "java.lang.Boolean",
|
||||
"deprecation": {
|
||||
"replacement": "spring.flyway.fail-on-missing-locations",
|
||||
"level": "error"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "spring.flyway.cherry-pick",
|
||||
"description": "Migrations that Flyway should consider when migrating or undoing. When empty all available migrations are considered. Requires Flyway Teams.",
|
||||
"deprecation": {
|
||||
"level": "error",
|
||||
"reason": "Removed in Flyway 10"
|
||||
}
|
||||
},{
|
||||
"name": "spring.flyway.community-db-support-enabled",
|
||||
"defaultValue": false
|
||||
},
|
||||
{
|
||||
"name": "spring.flyway.dry-run-output",
|
||||
"type": "java.io.OutputStream",
|
||||
"deprecation": {
|
||||
"level": "error",
|
||||
"reason": "Flyway Teams only."
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "spring.flyway.error-handlers",
|
||||
"type": "org.flywaydb.core.api.errorhandler.ErrorHandler[]",
|
||||
"deprecation": {
|
||||
"level": "error",
|
||||
"reason": "Flyway Teams only."
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "spring.flyway.ignore-future-migrations",
|
||||
"type": "java.lang.Boolean",
|
||||
"description": "Whether to ignore future migrations when reading the schema history table.",
|
||||
"deprecation": {
|
||||
"level": "error",
|
||||
"reason": "Removed in Flyway 9.0",
|
||||
"replacement": "spring.flyway.ignore-migration-patterns"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "spring.flyway.ignore-ignored-migrations",
|
||||
"type": "java.lang.Boolean",
|
||||
"description": "Whether to ignore ignored migrations when reading the schema history table.",
|
||||
"deprecation": {
|
||||
"level": "error",
|
||||
"reason": "Removed in Flyway 9.0",
|
||||
"replacement": "spring.flyway.ignore-migration-patterns"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "spring.flyway.ignore-missing-migrations",
|
||||
"type": "java.lang.Boolean",
|
||||
"description": "Whether to ignore missing migrations when reading the schema history table.",
|
||||
"deprecation": {
|
||||
"level": "error",
|
||||
"reason": "Removed in Flyway 9.0",
|
||||
"replacement": "spring.flyway.ignore-migration-patterns"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "spring.flyway.ignore-pending-migrations",
|
||||
"type": "java.lang.Boolean",
|
||||
"description": "Whether to ignore pending migrations when reading the schema history table.",
|
||||
"deprecation": {
|
||||
"level": "error",
|
||||
"reason": "Removed in Flyway 9.0",
|
||||
"replacement": "spring.flyway.ignore-migration-patterns"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "spring.flyway.license-key",
|
||||
"description": "License key for Flyway Teams.",
|
||||
"deprecation": {
|
||||
"level": "error",
|
||||
"reason": "Removed in Flyway 10"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "spring.flyway.locations",
|
||||
"sourceType": "org.springframework.boot.autoconfigure.flyway.FlywayProperties",
|
||||
"defaultValue": [
|
||||
"classpath:db/migration"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "spring.flyway.oracle-kerberos-config-file",
|
||||
"type": "java.lang.String",
|
||||
"deprecation": {
|
||||
"replacement": "spring.flyway.kerberos-config-file",
|
||||
"level": "error"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "spring.flyway.sql-migration-suffix",
|
||||
"type": "java.lang.String",
|
||||
"deprecation": {
|
||||
"replacement": "spring.flyway.sql-migration-suffixes",
|
||||
"level": "error"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "spring.flyway.sql-migration-suffixes",
|
||||
"sourceType": "org.springframework.boot.autoconfigure.flyway.FlywayProperties",
|
||||
"defaultValue": [
|
||||
".sql"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "spring.flyway.undo-sql-migration-prefix",
|
||||
"type": "java.lang.String",
|
||||
"deprecation": {
|
||||
"level": "error",
|
||||
"reason": "Removed in Flyway 10"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "spring.flyway.vault-secrets",
|
||||
"type": "java.util.List<java.lang.String>",
|
||||
"deprecation": {
|
||||
"level": "error",
|
||||
"reason": "Removed in the open source release of Flyway 7.12."
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "spring.flyway.vault-token",
|
||||
"type": "java.lang.String",
|
||||
"deprecation": {
|
||||
"level": "error",
|
||||
"reason": "Removed in the open source release of Flyway 7.12."
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "spring.flyway.vault-url",
|
||||
"type": "java.lang.String",
|
||||
"deprecation": {
|
||||
"level": "error",
|
||||
"reason": "Removed in the open source release of Flyway 7.12."
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,2 @@
|
|||
org.springframework.beans.factory.aot.BeanRegistrationAotProcessor=\
|
||||
org.springframework.boot.flyway.autoconfigure.ResourceProviderCustomizerBeanRegistrationAotProcessor
|
|
@ -0,0 +1 @@
|
|||
org.springframework.boot.flyway.autoconfigure.FlywayAutoConfiguration
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2024 the original author or authors.
|
||||
* Copyright 2012-2025 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.autoconfigure.flyway;
|
||||
package org.springframework.boot.flyway.autoconfigure;
|
||||
|
||||
import org.flywaydb.core.Flyway;
|
||||
import org.flywaydb.core.api.Location;
|
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.autoconfigure.flyway;
|
||||
package org.springframework.boot.flyway.autoconfigure;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.lang.annotation.ElementType;
|
||||
|
@ -61,16 +61,14 @@ import org.springframework.aot.hint.predicate.RuntimeHintsPredicates;
|
|||
import org.springframework.beans.factory.BeanCreationException;
|
||||
import org.springframework.beans.factory.config.BeanDefinition;
|
||||
import org.springframework.boot.autoconfigure.AutoConfigurations;
|
||||
import org.springframework.boot.autoconfigure.flyway.FlywayAutoConfiguration.FlywayAutoConfigurationRuntimeHints;
|
||||
import org.springframework.boot.autoconfigure.flyway.FlywayAutoConfiguration.OracleFlywayConfigurationCustomizer;
|
||||
import org.springframework.boot.autoconfigure.flyway.FlywayAutoConfiguration.PostgresqlFlywayConfigurationCustomizer;
|
||||
import org.springframework.boot.autoconfigure.flyway.FlywayAutoConfiguration.SqlServerFlywayConfigurationCustomizer;
|
||||
import org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration;
|
||||
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
||||
import org.springframework.boot.flyway.autoconfigure.FlywayAutoConfiguration.FlywayAutoConfigurationRuntimeHints;
|
||||
import org.springframework.boot.flyway.autoconfigure.FlywayAutoConfiguration.OracleFlywayConfigurationCustomizer;
|
||||
import org.springframework.boot.flyway.autoconfigure.FlywayAutoConfiguration.PostgresqlFlywayConfigurationCustomizer;
|
||||
import org.springframework.boot.flyway.autoconfigure.FlywayAutoConfiguration.SqlServerFlywayConfigurationCustomizer;
|
||||
import org.springframework.boot.jdbc.DataSourceBuilder;
|
||||
import org.springframework.boot.jdbc.EmbeddedDatabaseConnection;
|
||||
import org.springframework.boot.jdbc.SchemaManagement;
|
||||
import org.springframework.boot.jdbc.autoconfigure.DataSourceAutoConfiguration;
|
||||
import org.springframework.boot.jdbc.autoconfigure.DataSourceProperties;
|
||||
import org.springframework.boot.jdbc.autoconfigure.EmbeddedDataSourceConfiguration;
|
||||
import org.springframework.boot.jdbc.autoconfigure.JdbcConnectionDetails;
|
||||
|
@ -492,36 +490,6 @@ class FlywayAutoConfigurationTests {
|
|||
.run((context) -> assertThat(context).hasNotFailed());
|
||||
}
|
||||
|
||||
@Test
|
||||
@WithMetaInfPersistenceXmlResource
|
||||
void jpaApplyDdl() {
|
||||
this.contextRunner
|
||||
.withConfiguration(
|
||||
AutoConfigurations.of(DataSourceAutoConfiguration.class, HibernateJpaAutoConfiguration.class))
|
||||
.run((context) -> {
|
||||
Map<String, Object> jpaProperties = context.getBean(LocalContainerEntityManagerFactoryBean.class)
|
||||
.getJpaPropertyMap();
|
||||
assertThat(jpaProperties).doesNotContainKey("hibernate.hbm2ddl.auto");
|
||||
});
|
||||
}
|
||||
|
||||
@Test
|
||||
@WithMetaInfPersistenceXmlResource
|
||||
void jpaAndMultipleDataSourcesApplyDdl() {
|
||||
this.contextRunner.withConfiguration(AutoConfigurations.of(HibernateJpaAutoConfiguration.class))
|
||||
.withUserConfiguration(JpaWithMultipleDataSourcesConfiguration.class)
|
||||
.run((context) -> {
|
||||
LocalContainerEntityManagerFactoryBean normalEntityManagerFactoryBean = context
|
||||
.getBean("&normalEntityManagerFactory", LocalContainerEntityManagerFactoryBean.class);
|
||||
assertThat(normalEntityManagerFactoryBean.getJpaPropertyMap()).containsEntry("configured", "normal")
|
||||
.containsEntry("hibernate.hbm2ddl.auto", "create-drop");
|
||||
LocalContainerEntityManagerFactoryBean flywayEntityManagerFactoryBean = context
|
||||
.getBean("&flywayEntityManagerFactory", LocalContainerEntityManagerFactoryBean.class);
|
||||
assertThat(flywayEntityManagerFactoryBean.getJpaPropertyMap()).containsEntry("configured", "flyway")
|
||||
.doesNotContainKey("hibernate.hbm2ddl.auto");
|
||||
});
|
||||
}
|
||||
|
||||
@Test
|
||||
void customFlywayWithJdbc() {
|
||||
this.contextRunner
|
||||
|
@ -957,9 +925,9 @@ class FlywayAutoConfigurationTests {
|
|||
@Test
|
||||
void overrideLoggers() {
|
||||
this.contextRunner.withUserConfiguration(EmbeddedDataSourceConfiguration.class)
|
||||
.withPropertyValues("spring.flyway.loggers=log4j2")
|
||||
.withPropertyValues("spring.flyway.loggers=apache-commons")
|
||||
.run((context) -> assertThat(context.getBean(Flyway.class).getConfiguration().getLoggers())
|
||||
.containsExactly("log4j2"));
|
||||
.containsExactly("apache-commons"));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@ -1439,7 +1407,7 @@ class FlywayAutoConfigurationTests {
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<persistence version="2.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence https://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">
|
||||
<persistence-unit name="manually-configured">
|
||||
<class>org.springframework.boot.autoconfigure.flyway.FlywayAutoConfigurationTests$City</class>
|
||||
<class>org.springframework.boot.flyway.autoconfigure.FlywayAutoConfigurationTests$City</class>
|
||||
<exclude-unlisted-classes>true</exclude-unlisted-classes>
|
||||
</persistence-unit>
|
||||
</persistence>
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2024 the original author or authors.
|
||||
* Copyright 2012-2025 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.autoconfigure.flyway;
|
||||
package org.springframework.boot.flyway.autoconfigure;
|
||||
|
||||
import java.beans.PropertyDescriptor;
|
||||
import java.time.Duration;
|
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.autoconfigure.flyway;
|
||||
package org.springframework.boot.flyway.autoconfigure;
|
||||
|
||||
import java.util.Collection;
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2023 the original author or authors.
|
||||
* Copyright 2012-2025 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.autoconfigure.flyway;
|
||||
package org.springframework.boot.flyway.autoconfigure;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.function.Consumer;
|
|
@ -36,6 +36,7 @@ dependencies {
|
|||
dockerTestRuntimeOnly("io.lettuce:lettuce-core")
|
||||
dockerTestRuntimeOnly("org.springframework.data:spring-data-redis")
|
||||
|
||||
optional(project(":spring-boot-project:spring-boot-flyway"))
|
||||
optional(project(":spring-boot-project:spring-boot-jackson"))
|
||||
optional(project(":spring-boot-project:spring-boot-jdbc"))
|
||||
optional(project(":spring-boot-project:spring-boot-jsonb"))
|
||||
|
@ -119,6 +120,7 @@ dependencies {
|
|||
testImplementation("org.thymeleaf:thymeleaf")
|
||||
|
||||
testRuntimeOnly(project(":spring-boot-project:spring-boot-tomcat"))
|
||||
testRuntimeOnly("org.flywaydb:flyway-database-hsqldb")
|
||||
}
|
||||
|
||||
configurations {
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
# AutoConfigureDataJdbc auto-configuration imports
|
||||
org.springframework.boot.autoconfigure.data.jdbc.JdbcRepositoriesAutoConfiguration
|
||||
org.springframework.boot.autoconfigure.flyway.FlywayAutoConfiguration
|
||||
org.springframework.boot.autoconfigure.liquibase.LiquibaseAutoConfiguration
|
||||
org.springframework.boot.jdbc.autoconfigure.DataSourceAutoConfiguration
|
||||
org.springframework.boot.jdbc.autoconfigure.DataSourceInitializationAutoConfiguration
|
||||
|
@ -8,4 +7,5 @@ org.springframework.boot.jdbc.autoconfigure.DataSourceTransactionManagerAutoConf
|
|||
org.springframework.boot.jdbc.autoconfigure.JdbcClientAutoConfiguration
|
||||
org.springframework.boot.jdbc.autoconfigure.JdbcTemplateAutoConfiguration
|
||||
org.springframework.boot.transaction.autoconfigure.TransactionAutoConfiguration
|
||||
optional:org.springframework.boot.flyway.autoconfigure.FlywayAutoConfiguration
|
||||
optional:org.springframework.boot.testcontainers.service.connection.ServiceConnectionAutoConfiguration
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
# AutoConfigureDataR2dbc auto-configuration imports
|
||||
org.springframework.boot.autoconfigure.data.r2dbc.R2dbcRepositoriesAutoConfiguration
|
||||
org.springframework.boot.autoconfigure.data.r2dbc.R2dbcDataAutoConfiguration
|
||||
org.springframework.boot.autoconfigure.flyway.FlywayAutoConfiguration
|
||||
org.springframework.boot.autoconfigure.liquibase.LiquibaseAutoConfiguration
|
||||
org.springframework.boot.autoconfigure.r2dbc.R2dbcAutoConfiguration
|
||||
org.springframework.boot.autoconfigure.r2dbc.R2dbcInitializationAutoConfiguration
|
||||
org.springframework.boot.autoconfigure.r2dbc.R2dbcTransactionManagerAutoConfiguration
|
||||
org.springframework.boot.transaction.autoconfigure.TransactionAutoConfiguration
|
||||
optional:org.springframework.boot.flyway.autoconfigure.FlywayAutoConfiguration
|
||||
optional:org.springframework.boot.testcontainers.service.connection.ServiceConnectionAutoConfiguration
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
# AutoConfigureJdbc auto-configuration imports
|
||||
org.springframework.boot.autoconfigure.flyway.FlywayAutoConfiguration
|
||||
org.springframework.boot.autoconfigure.liquibase.LiquibaseAutoConfiguration
|
||||
org.springframework.boot.jdbc.autoconfigure.DataSourceAutoConfiguration
|
||||
org.springframework.boot.jdbc.autoconfigure.DataSourceInitializationAutoConfiguration
|
||||
|
@ -7,4 +6,5 @@ org.springframework.boot.jdbc.autoconfigure.DataSourceTransactionManagerAutoConf
|
|||
org.springframework.boot.jdbc.autoconfigure.JdbcClientAutoConfiguration
|
||||
org.springframework.boot.jdbc.autoconfigure.JdbcTemplateAutoConfiguration
|
||||
org.springframework.boot.transaction.autoconfigure.TransactionAutoConfiguration
|
||||
optional:org.springframework.boot.flyway.autoconfigure.FlywayAutoConfiguration
|
||||
optional:org.springframework.boot.testcontainers.service.connection.ServiceConnectionAutoConfiguration
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
# AutoConfigureJooq auto-configuration imports
|
||||
org.springframework.boot.autoconfigure.flyway.FlywayAutoConfiguration
|
||||
org.springframework.boot.autoconfigure.jooq.JooqAutoConfiguration
|
||||
org.springframework.boot.autoconfigure.liquibase.LiquibaseAutoConfiguration
|
||||
org.springframework.boot.jdbc.autoconfigure.DataSourceAutoConfiguration
|
||||
org.springframework.boot.jdbc.autoconfigure.DataSourceInitializationAutoConfiguration
|
||||
org.springframework.boot.jdbc.autoconfigure.DataSourceTransactionManagerAutoConfiguration
|
||||
org.springframework.boot.transaction.autoconfigure.TransactionAutoConfiguration
|
||||
optional:org.springframework.boot.flyway.autoconfigure.FlywayAutoConfiguration
|
||||
optional:org.springframework.boot.testcontainers.service.connection.ServiceConnectionAutoConfiguration
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
# AutoConfigureDataJpa auto-configuration imports
|
||||
org.springframework.boot.autoconfigure.data.jpa.JpaRepositoriesAutoConfiguration
|
||||
org.springframework.boot.autoconfigure.flyway.FlywayAutoConfiguration
|
||||
org.springframework.boot.autoconfigure.liquibase.LiquibaseAutoConfiguration
|
||||
org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration
|
||||
org.springframework.boot.jdbc.autoconfigure.DataSourceAutoConfiguration
|
||||
|
@ -9,4 +8,5 @@ org.springframework.boot.jdbc.autoconfigure.DataSourceTransactionManagerAutoConf
|
|||
org.springframework.boot.jdbc.autoconfigure.JdbcClientAutoConfiguration
|
||||
org.springframework.boot.jdbc.autoconfigure.JdbcTemplateAutoConfiguration
|
||||
org.springframework.boot.transaction.autoconfigure.TransactionAutoConfiguration
|
||||
optional:org.springframework.boot.flyway.autoconfigure.FlywayAutoConfiguration
|
||||
optional:org.springframework.boot.testcontainers.service.connection.ServiceConnectionAutoConfiguration
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2023 the original author or authors.
|
||||
* Copyright 2012-2025 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -22,8 +22,8 @@ import org.junit.jupiter.api.Test;
|
|||
|
||||
import org.springframework.beans.factory.NoSuchBeanDefinitionException;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.autoconfigure.flyway.FlywayAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.liquibase.LiquibaseAutoConfiguration;
|
||||
import org.springframework.boot.flyway.autoconfigure.FlywayAutoConfiguration;
|
||||
import org.springframework.boot.testcontainers.service.connection.ServiceConnectionAutoConfiguration;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2023 the original author or authors.
|
||||
* Copyright 2012-2025 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -24,8 +24,8 @@ import org.junit.jupiter.api.Test;
|
|||
|
||||
import org.springframework.beans.factory.NoSuchBeanDefinitionException;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.autoconfigure.flyway.FlywayAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.liquibase.LiquibaseAutoConfiguration;
|
||||
import org.springframework.boot.flyway.autoconfigure.FlywayAutoConfiguration;
|
||||
import org.springframework.boot.testcontainers.service.connection.ServiceConnectionAutoConfiguration;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2023 the original author or authors.
|
||||
* Copyright 2012-2025 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -25,8 +25,8 @@ import org.junit.jupiter.api.Test;
|
|||
import org.springframework.beans.factory.NoSuchBeanDefinitionException;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.autoconfigure.cache.CacheAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.flyway.FlywayAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.liquibase.LiquibaseAutoConfiguration;
|
||||
import org.springframework.boot.flyway.autoconfigure.FlywayAutoConfiguration;
|
||||
import org.springframework.boot.test.autoconfigure.orm.jpa.ExampleComponent;
|
||||
import org.springframework.boot.testcontainers.service.connection.ServiceConnectionAutoConfiguration;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2023 the original author or authors.
|
||||
* Copyright 2012-2025 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -22,8 +22,8 @@ import org.junit.jupiter.api.Test;
|
|||
|
||||
import org.springframework.beans.factory.NoSuchBeanDefinitionException;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.autoconfigure.flyway.FlywayAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.liquibase.LiquibaseAutoConfiguration;
|
||||
import org.springframework.boot.flyway.autoconfigure.FlywayAutoConfiguration;
|
||||
import org.springframework.boot.testcontainers.service.connection.ServiceConnectionAutoConfiguration;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.data.repository.config.BootstrapMode;
|
||||
|
@ -42,7 +42,7 @@ import static org.springframework.boot.test.autoconfigure.AutoConfigurationImpor
|
|||
* @author Scott Frederick
|
||||
* @author Yanming Zhou
|
||||
*/
|
||||
@DataJpaTest
|
||||
@DataJpaTest(properties = "spring.jpa.hibernate.ddl-auto=create-drop")
|
||||
class DataJpaTestIntegrationTests {
|
||||
|
||||
@Autowired
|
||||
|
|
|
@ -13,6 +13,7 @@ dependencies {
|
|||
api(project(":spring-boot-project:spring-boot-autoconfigure-all"))
|
||||
api("org.testcontainers:testcontainers")
|
||||
|
||||
dockerTestImplementation(project(":spring-boot-project:spring-boot-flyway"))
|
||||
dockerTestImplementation(project(":spring-boot-project:spring-boot-jdbc"))
|
||||
dockerTestImplementation(project(":spring-boot-project:spring-boot-test"))
|
||||
dockerTestImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support-docker"))
|
||||
|
@ -32,7 +33,6 @@ dependencies {
|
|||
}
|
||||
dockerTestImplementation("org.assertj:assertj-core")
|
||||
dockerTestImplementation("org.awaitility:awaitility")
|
||||
dockerTestImplementation("org.flywaydb:flyway-core")
|
||||
dockerTestImplementation("org.junit.jupiter:junit-jupiter")
|
||||
dockerTestImplementation("org.junit.platform:junit-platform-launcher")
|
||||
dockerTestImplementation("org.liquibase:liquibase-core") {
|
||||
|
@ -60,6 +60,7 @@ dependencies {
|
|||
optional(project(":spring-boot-project:spring-boot-amqp"))
|
||||
optional(project(":spring-boot-project:spring-boot-artemis"))
|
||||
optional(project(":spring-boot-project:spring-boot-actuator-autoconfigure"))
|
||||
optional(project(":spring-boot-project:spring-boot-flyway"))
|
||||
optional(project(":spring-boot-project:spring-boot-jdbc"))
|
||||
optional(project(":spring-boot-project:spring-boot-tx"))
|
||||
optional("org.springframework:spring-test")
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2024 the original author or authors.
|
||||
* Copyright 2012-2025 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -24,7 +24,7 @@ import org.testcontainers.junit.jupiter.Testcontainers;
|
|||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.autoconfigure.ImportAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.flyway.FlywayAutoConfiguration;
|
||||
import org.springframework.boot.flyway.autoconfigure.FlywayAutoConfiguration;
|
||||
import org.springframework.boot.jdbc.autoconfigure.JdbcConnectionDetails;
|
||||
import org.springframework.boot.testcontainers.service.connection.ServiceConnection;
|
||||
import org.springframework.boot.testsupport.container.TestImage;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2023 the original author or authors.
|
||||
* Copyright 2012-2025 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -18,7 +18,7 @@ package org.springframework.boot.testcontainers.service.connection.flyway;
|
|||
|
||||
import org.testcontainers.containers.JdbcDatabaseContainer;
|
||||
|
||||
import org.springframework.boot.autoconfigure.flyway.FlywayConnectionDetails;
|
||||
import org.springframework.boot.flyway.autoconfigure.FlywayConnectionDetails;
|
||||
import org.springframework.boot.testcontainers.service.connection.ContainerConnectionDetailsFactory;
|
||||
import org.springframework.boot.testcontainers.service.connection.ContainerConnectionSource;
|
||||
import org.springframework.boot.testcontainers.service.connection.ServiceConnection;
|
||||
|
|
|
@ -16,8 +16,7 @@ dependencies {
|
|||
|
||||
implementation(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-data-r2dbc"))
|
||||
|
||||
runtimeOnly(project(":spring-boot-project:spring-boot-jdbc"))
|
||||
runtimeOnly("org.flywaydb:flyway-core")
|
||||
runtimeOnly(project(":spring-boot-project:spring-boot-flyway"))
|
||||
runtimeOnly("org.flywaydb:flyway-database-postgresql")
|
||||
runtimeOnly("org.postgresql:postgresql")
|
||||
runtimeOnly("org.postgresql:r2dbc-postgresql")
|
||||
|
|
|
@ -9,8 +9,8 @@ dependencies {
|
|||
implementation(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-data-jpa"))
|
||||
implementation(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-web"))
|
||||
|
||||
runtimeOnly(project(":spring-boot-project:spring-boot-flyway"))
|
||||
runtimeOnly("com.h2database:h2")
|
||||
runtimeOnly("org.flywaydb:flyway-core")
|
||||
|
||||
testImplementation(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-test"))
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue