mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-09-03 04:26:12 +08:00
Fix QuartzAutoConfiguration when Liquibase is not on the class path
Fixes gh-18153
This commit is contained in:
parent
8882c532cd
commit
19ccfaea86
@ -166,8 +166,8 @@ public class QuartzAutoConfiguration {
|
||||
|
||||
/**
|
||||
* Additional configuration to ensure that {@link SchedulerFactoryBean} and
|
||||
* {@link Scheduler} beans depend on the {@link QuartzDataSourceInitializer}
|
||||
* bean(s).
|
||||
* {@link Scheduler} beans depend on any beans that perform data source
|
||||
* initialization.
|
||||
*/
|
||||
@Configuration
|
||||
static class QuartzSchedulerDependencyConfiguration {
|
||||
@ -183,10 +183,16 @@ public class QuartzAutoConfiguration {
|
||||
return new SchedulerDependsOnBeanFactoryPostProcessor(FlywayMigrationInitializer.class);
|
||||
}
|
||||
|
||||
@Bean
|
||||
@ConditionalOnBean(SpringLiquibase.class)
|
||||
public static SchedulerDependsOnBeanFactoryPostProcessor quartzSchedulerLiquibaseDependsOnBeanFactoryPostProcessor() {
|
||||
return new SchedulerDependsOnBeanFactoryPostProcessor(SpringLiquibase.class);
|
||||
@Configuration
|
||||
@ConditionalOnClass(SpringLiquibase.class)
|
||||
static class LiquibaseQuartzSchedulerDependencyConfiguration {
|
||||
|
||||
@Bean
|
||||
@ConditionalOnBean(SpringLiquibase.class)
|
||||
public static SchedulerDependsOnBeanFactoryPostProcessor quartzSchedulerLiquibaseDependsOnBeanFactoryPostProcessor() {
|
||||
return new SchedulerDependsOnBeanFactoryPostProcessor(SpringLiquibase.class);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user