commit
This commit is contained in:
@@ -6,8 +6,6 @@ import org.quartz.Job;
|
||||
import org.quartz.Scheduler;
|
||||
import org.quartz.spi.JobFactory;
|
||||
import org.quartz.spi.TriggerFiredBundle;
|
||||
import org.springframework.batch.core.configuration.JobRegistry;
|
||||
import org.springframework.batch.core.configuration.support.JobRegistryBeanPostProcessor;
|
||||
import org.springframework.beans.factory.config.AutowireCapableBeanFactory;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
@@ -23,20 +21,7 @@ public class QuartzConfig {
|
||||
private final QuartzProperties quartzProperties;
|
||||
private final DataSource dataSource;
|
||||
private final PlatformTransactionManager transactionManager;
|
||||
|
||||
/**
|
||||
* JobRegistry 에 Job 을 자동으로 등록하기 위한 설정.
|
||||
*
|
||||
* @param jobRegistry ths Spring Batch Job Registry
|
||||
* @return JobRegistry BeanPostProcessor
|
||||
*/
|
||||
@Bean
|
||||
JobRegistryBeanPostProcessor jobRegistryBeanPostProcessor(JobRegistry jobRegistry) {
|
||||
var jobRegistryBeanPostProcessor = new JobRegistryBeanPostProcessor();
|
||||
jobRegistryBeanPostProcessor.setJobRegistry(jobRegistry);
|
||||
return jobRegistryBeanPostProcessor;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Quartz Schedule Job 에 의존성 주입
|
||||
*
|
||||
@@ -55,10 +40,8 @@ public class QuartzConfig {
|
||||
/**
|
||||
* Scheduler 전체를 관리하는 Manager.
|
||||
*
|
||||
* @param datasource Spring datasource
|
||||
* @param quartzProperties quartz config
|
||||
* @param jobFactory job factory
|
||||
* @return the scheduler factory bean
|
||||
* @throws Exception the exception
|
||||
*/
|
||||
@Bean
|
||||
SchedulerFactoryBean schedulerFactoryBean(JobFactory jobFactory) {
|
||||
|
||||
Reference in New Issue
Block a user