|
|
@ -169,10 +169,7 @@ public class FlywayAutoConfiguration {
|
|
|
|
+ " One type must be used exclusively.");
|
|
|
|
+ " One type must be used exclusively.");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
String[] locations = new LocationResolver(flyway.getDataSource())
|
|
|
|
checkLocationExists(flyway);
|
|
|
|
.resolveLocations(this.properties.getLocations());
|
|
|
|
|
|
|
|
checkLocationExists(locations);
|
|
|
|
|
|
|
|
flyway.setLocations(locations);
|
|
|
|
|
|
|
|
return flyway;
|
|
|
|
return flyway;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -182,7 +179,9 @@ public class FlywayAutoConfiguration {
|
|
|
|
return (value != null) ? value : defaultValue.get();
|
|
|
|
return (value != null) ? value : defaultValue.get();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private void checkLocationExists(String... locations) {
|
|
|
|
private void checkLocationExists(Flyway flyway) {
|
|
|
|
|
|
|
|
String[] locations = new LocationResolver(flyway.getDataSource())
|
|
|
|
|
|
|
|
.resolveLocations(this.properties.getLocations());
|
|
|
|
if (this.properties.isCheckLocation()) {
|
|
|
|
if (this.properties.isCheckLocation()) {
|
|
|
|
Assert.state(locations.length != 0,
|
|
|
|
Assert.state(locations.length != 0,
|
|
|
|
"Migration script locations not configured");
|
|
|
|
"Migration script locations not configured");
|
|
|
|