From 76df3fc496238e0a557ba92620196bcafaf50655 Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Thu, 2 Nov 2017 18:54:04 +0000 Subject: [PATCH] Use explicit classpath: prefix for Flyway location Flyway implicitly adds classpath: to locations without a prefix but resource loader fails to find migratons on the classpath without the prefix. Add an explicit classpath: prefix so that both Flyway and the resource loader used to check the locations can find the migration location. See gh-10807 --- .../boot/autoconfigure/flyway/FlywayProperties.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 2ebe8dc4798..0e610c691ed 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 @@ -42,7 +42,7 @@ public class FlywayProperties { * use vendor-specific locations. */ private List locations = new ArrayList<>( - Collections.singletonList("db/migration")); + Collections.singletonList("classpath:db/migration")); /** * Check that migration scripts location exists.