You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Update `DatabaseInitializationDependencyConfigurer` so that depends-on
ordering is applied based on the `DatabaseInitializerDetector` order.
Prior to this commit, if multiple DatabaseInitializer beans were
detected the order in which they were initialized was not defined.
See gh-26692
Copy file name to clipboardExpand all lines: spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/flyway/FlywayMigrationInitializerDatabaseInitializerDetector.java
Copy file name to clipboardExpand all lines: spring-boot-project/spring-boot/src/main/java/org/springframework/boot/sql/init/dependency/DatabaseInitializationDependencyConfigurer.java
+13-3Lines changed: 13 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -98,12 +98,22 @@ public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory)
98
98
if (initializerBeanNames.isEmpty()) {
99
99
return;
100
100
}
101
+
StringpreviousInitializerBeanName = null;
102
+
for (StringinitializerBeanName : initializerBeanNames) {
Copy file name to clipboardExpand all lines: spring-boot-project/spring-boot/src/main/java/org/springframework/boot/sql/init/dependency/DatabaseInitializerDetector.java
Copy file name to clipboardExpand all lines: spring-boot-project/spring-boot/src/test/java/org/springframework/boot/sql/init/dependency/DatabaseInitializationDependencyConfigurerTests.java
0 commit comments