From 4135e3c0611725e646d67c7406d81828baa13a93 Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Thu, 21 Jan 2021 12:09:07 +0000 Subject: [PATCH] Upgrade to Flyway 7.5 Closes gh-24953 --- .../boot/autoconfigure/flyway/FlywayAutoConfiguration.java | 6 +++--- .../boot/autoconfigure/flyway/FlywayPropertiesTests.java | 6 ++++-- spring-boot-project/spring-boot-dependencies/build.gradle | 2 +- 3 files changed, 8 insertions(+), 6 deletions(-) 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 3bbea054e0..f9d6c26be2 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 @@ -1,5 +1,5 @@ /* - * Copyright 2012-2020 the original author or authors. + * Copyright 2012-2021 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. @@ -231,10 +231,10 @@ public class FlywayAutoConfiguration { .to((jdbcProperties) -> configuration.jdbcProperties(jdbcProperties)); // No method reference for compatibility with Flyway 6.x map.from(properties.getOracleKerberosCacheFile()).whenNonNull() - .to((cacheFile) -> configuration.orackeKerberosCacheFile(cacheFile)); + .to((cacheFile) -> configuration.oracleKerberosCacheFile(cacheFile)); // No method reference for compatibility with Flyway 6.x map.from(properties.getOracleKerberosConfigFile()).whenNonNull() - .to((configFile) -> configuration.orackeKerberosConfigFile(configFile)); + .to((configFile) -> configuration.oracleKerberosConfigFile(configFile)); // No method reference for compatibility with Flyway 6.x map.from(properties.getOutputQueryResults()).whenNonNull() .to((outputQueryResults) -> configuration.outputQueryResults(outputQueryResults)); diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/flyway/FlywayPropertiesTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/flyway/FlywayPropertiesTests.java index 39a3fa7acb..8b614c470b 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/flyway/FlywayPropertiesTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/flyway/FlywayPropertiesTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2020 the original author or authors. + * Copyright 2012-2021 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. @@ -100,7 +100,6 @@ class FlywayPropertiesTests { PropertyAccessorFactory.forBeanPropertyAccess(new ClassicConfiguration())); // Properties specific settings ignoreProperties(properties, "url", "user", "password", "enabled", "checkLocation", "createDataSource"); - // High level object we can't set with properties ignoreProperties(configuration, "callbacks", "classLoader", "dataSource", "javaMigrations", "javaMigrationClassProvider", "resourceProvider", "resolvers"); @@ -109,6 +108,9 @@ class FlywayPropertiesTests { // Handled by the conversion service ignoreProperties(configuration, "baselineVersionAsString", "encodingAsString", "locationsAsStrings", "targetAsString"); + // Teams-only properties that we cannot detect as no exception is thrown and + // getters return null + ignoreProperties(configuration, "conjurToken", "conjurUrl", "vaultSecret", "vaultToken", "vaultUrl"); // Handled as initSql array ignoreProperties(configuration, "initSql"); ignoreProperties(properties, "initSqls"); diff --git a/spring-boot-project/spring-boot-dependencies/build.gradle b/spring-boot-project/spring-boot-dependencies/build.gradle index 92fafe3b75..a5f1063c4b 100644 --- a/spring-boot-project/spring-boot-dependencies/build.gradle +++ b/spring-boot-project/spring-boot-dependencies/build.gradle @@ -300,7 +300,7 @@ bom { ] } } - library("Flyway", "7.1.1") { + library("Flyway", "7.5.0") { group("org.flywaydb") { modules = [ "flyway-core"