diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/flyway/FlywayAutoConfiguration.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/flyway/FlywayAutoConfiguration.java index a5cc7bf2d2..68fe4bc6b3 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/flyway/FlywayAutoConfiguration.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/flyway/FlywayAutoConfiguration.java @@ -224,7 +224,8 @@ public class FlywayAutoConfiguration { map.from(properties.getDryRunOutput()).to(configuration::dryRunOutput); map.from(properties.getErrorOverrides()).to(configuration::errorOverrides); map.from(properties.getLicenseKey()).to(configuration::licenseKey); - map.from(properties.getOracleSqlplus()).to(configuration::oracleSqlplus); + // No method reference for compatibility with Flyway 9.20+ + map.from(properties.getOracleSqlplus()).to((oracleSqlplus) -> configuration.oracleSqlplus(oracleSqlplus)); // No method reference for compatibility with Flyway 5.x map.from(properties.getOracleSqlplusWarn()) .to((oracleSqlplusWarn) -> configuration.oracleSqlplusWarn(oracleSqlplusWarn)); diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/flyway/Flyway9xAutoConfigurationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/flyway/Flyway9xAutoConfigurationTests.java index 51d859f42c..174fe9ff44 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/flyway/Flyway9xAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/flyway/Flyway9xAutoConfigurationTests.java @@ -32,7 +32,8 @@ import static org.assertj.core.api.Assertions.assertThat; * * @author Andy Wilkinson */ -@ClassPathOverrides({ "org.flywaydb:flyway-core:9.1.2", "com.h2database:h2:2.1.210" }) +@ClassPathOverrides({ "org.flywaydb:flyway-core:9.20.0", "org.flywaydb:flyway-sqlserver:9.20.0", + "com.h2database:h2:2.1.210" }) class Flyway9xAutoConfigurationTests { private final ApplicationContextRunner contextRunner = new ApplicationContextRunner()