Skip to content

Commit 71d5d48

Browse files
committed
Merge branch '2.1.x'
Closes gh-18165
2 parents 3e56e00 + 19ccfae commit 71d5d48

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/quartz/QuartzAutoConfiguration.java

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,8 @@ public QuartzDataSourceInitializer quartzDataSourceInitializer(DataSource dataSo
133133

134134
/**
135135
* Additional configuration to ensure that {@link SchedulerFactoryBean} and
136-
* {@link Scheduler} beans depend on the {@link QuartzDataSourceInitializer}
137-
* bean(s).
136+
* {@link Scheduler} beans depend on any beans that perform data source
137+
* initialization.
138138
*/
139139
@Configuration(proxyBeanMethods = false)
140140
static class QuartzSchedulerDependencyConfiguration {
@@ -150,10 +150,16 @@ static SchedulerDependsOnBeanFactoryPostProcessor quartzSchedulerFlywayDependsOn
150150
return new SchedulerDependsOnBeanFactoryPostProcessor(FlywayMigrationInitializer.class);
151151
}
152152

153-
@Bean
154-
@ConditionalOnBean(SpringLiquibase.class)
155-
static SchedulerDependsOnBeanFactoryPostProcessor quartzSchedulerLiquibaseDependsOnBeanFactoryPostProcessor() {
156-
return new SchedulerDependsOnBeanFactoryPostProcessor(SpringLiquibase.class);
153+
@Configuration(proxyBeanMethods = false)
154+
@ConditionalOnClass(SpringLiquibase.class)
155+
static class LiquibaseQuartzSchedulerDependencyConfiguration {
156+
157+
@Bean
158+
@ConditionalOnBean(SpringLiquibase.class)
159+
static SchedulerDependsOnBeanFactoryPostProcessor quartzSchedulerLiquibaseDependsOnBeanFactoryPostProcessor() {
160+
return new SchedulerDependsOnBeanFactoryPostProcessor(SpringLiquibase.class);
161+
}
162+
157163
}
158164

159165
}

0 commit comments

Comments
 (0)