From 65c68ba64e02b0cd1736c52fadc85b94b3f6cfe1 Mon Sep 17 00:00:00 2001 From: Moritz Halbritter Date: Thu, 27 Oct 2022 10:13:51 +0200 Subject: [PATCH] Reinstate old flyway bean method Closes gh-32849 --- .../flyway/FlywayAutoConfiguration.java | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 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 5e40517196..4b76b0fe06 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 @@ -119,9 +119,18 @@ public class FlywayAutoConfiguration { return new ResourceProviderCustomizer(); } - @Bean + @Deprecated(since = "3.0.0", forRemoval = true) public Flyway flyway(FlywayProperties properties, ResourceLoader resourceLoader, - ObjectProvider dataSource, @FlywayDataSource ObjectProvider flywayDataSource, + ObjectProvider dataSource, ObjectProvider flywayDataSource, + ObjectProvider fluentConfigurationCustomizers, + ObjectProvider javaMigrations, ObjectProvider callbacks) { + return flyway(properties, resourceLoader, dataSource, flywayDataSource, fluentConfigurationCustomizers, + javaMigrations, callbacks, new ResourceProviderCustomizer()); + } + + @Bean + Flyway flyway(FlywayProperties properties, ResourceLoader resourceLoader, ObjectProvider dataSource, + @FlywayDataSource ObjectProvider flywayDataSource, ObjectProvider fluentConfigurationCustomizers, ObjectProvider javaMigrations, ObjectProvider callbacks, ResourceProviderCustomizer resourceProviderCustomizer) {