diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/flyway/FlywayProperties.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/flyway/FlywayProperties.java index ad11ce4166..2ebe8dc479 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/flyway/FlywayProperties.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/flyway/FlywayProperties.java @@ -31,6 +31,7 @@ import org.springframework.boot.context.properties.ConfigurationProperties; * properties into the {@link Flyway} instance. * * @author Dave Syer + * @author EddĂș MelĂ©ndez * @since 1.1.0 */ @ConfigurationProperties(prefix = "spring.flyway", ignoreUnknownFields = true) @@ -46,7 +47,7 @@ public class FlywayProperties { /** * Check that migration scripts location exists. */ - private boolean checkLocation = false; + private boolean checkLocation = true; /** * Enable flyway. diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/flyway/FlywayAutoConfigurationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/flyway/FlywayAutoConfigurationTests.java index 70afe42d2e..fbc279c0b8 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/flyway/FlywayAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/flyway/FlywayAutoConfigurationTests.java @@ -173,8 +173,7 @@ public class FlywayAutoConfigurationTests { public void checkLocationsAllMissing() { this.contextRunner.withUserConfiguration(EmbeddedDataSourceConfiguration.class) .withPropertyValues( - "spring.flyway.locations:classpath:db/missing1,classpath:db/migration2", - "spring.flyway.check-location:true") + "spring.flyway.locations:classpath:db/missing1,classpath:db/migration2") .run((context) -> { assertThat(context).hasFailed(); assertThat(context).getFailure() @@ -188,8 +187,7 @@ public class FlywayAutoConfigurationTests { public void checkLocationsAllExist() { this.contextRunner.withUserConfiguration(EmbeddedDataSourceConfiguration.class) .withPropertyValues( - "spring.flyway.locations:classpath:db/changelog,classpath:db/migration", - "spring.flyway.check-location:true") + "spring.flyway.locations:classpath:db/changelog,classpath:db/migration") .run((context) -> assertThat(context).hasNotFailed()); } diff --git a/spring-boot-project/spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc b/spring-boot-project/spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc index deed9c3346..2256592f67 100644 --- a/spring-boot-project/spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc +++ b/spring-boot-project/spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc @@ -487,7 +487,7 @@ content into your application; rather pick only the properties that you need. spring.flyway.baseline-description= # spring.flyway.baseline-on-migrate= # spring.flyway.baseline-version=1 # version to start migration - spring.flyway.check-location=false # Check that migration scripts location exists. + spring.flyway.check-location=true # Check that migration scripts location exists. spring.flyway.clean-disabled= # spring.flyway.clean-on-validation-error= # spring.flyway.enabled=true # Enable flyway.