When I got an error that the dataSource name is not set, I've added the name by setting property "spring.quartz.properties.org.quartz.jobStore.dataSource" This did not solve the problem, because now I got an Exception "There is no DataSource named '...'" although the dataSource bean...
当设置了dataSource属性,jobStore属性设置将无效,原因是: if(this.dataSource !=null) { mergedProps.put(StdSchedulerFactory.PROP_JOB_STORE_CLASS, LocalDataSourceJobStore.class.getName()); } 详细介绍请参见 SchedulerFactoryBean 方法 setDataSource(DataSource)的javadoc: Set the default DataSource to be...
setDataSource(job); Properties prop = new Properties(); // 任务调度实例名称,集群时多个实例名称保持一致 prop.put(StdSchedulerFactory.PROP_SCHED_INSTANCE_NAME, "FebsCloudScheduler"); // 任务调度实例ID,指定为AUTO时,将自动生成ID prop.put(StdSchedulerFactory.PROP_SCHED_INSTAN...
importorg.springframework.scheduling.quartz.SchedulerFactoryBean;//导入依赖的package包/类@BeanpublicSchedulerFactoryBeanschedulerFactoryBean(DataSource dataSource){SchedulerFactoryBeanfactory =newSchedulerFactoryBean(); factory.setDataSource(dataSource);//quartz参数Properties prop =newProperties(); prop.put("o...
class.getName()); schedulerFactory.setQuartzProperties(quartzProperties); return schedulerFactory; } 代码示例来源:origin: davidkiss/spring-boot-quartz-demo @Bean public Scheduler schedulerFactoryBean(DataSource dataSource, JobFactory jobFactory, @Qualifier("sampleJobTrigger") Trigger sampleJobTrigger) ...
(this.dataSource!=null){mergedProps.put(StdSchedulerFactory.PROP_JOB_STORE_CLASS,LocalDataSourceJobStore.class.getName());}// Make sure to set the scheduler name as configured in the Spring configuration.if(this.schedulerName!=null){mergedProps.put(StdSchedulerFactory.PROP_SCHED_INSTANCE_NAME,...
mergedProps.put(StdSchedulerFactory.PROP_JOB_STORE_CLASS, LocalDataSourceJobStore.class.getName()); } // Make sure to set the scheduler name as configured in the Spring configuration. if (this.schedulerName != null) { mergedProps.put(StdSchedulerFactory.PROP_SCHED_INSTANCE_NAME, this.scheduler...
schedulerFactory.setDataSource(dataSource); schedulerFactory.setWaitForJobsToCompleteOnShutdown(true); schedulerFactory.setOverwriteExistingJobs(true); schedulerFactory.setSchedulerName("LogsnifferScheduler"); PropertiesquartzProperties=newProperties(logSnifferProperties); ...
当设置了dataSource属性,jobStore属性设置将无效,原因是: if (this.dataSource != null) { mergedProps.put(StdSchedulerFactory.PROP_JOB_STORE_CLASS, LocalDataSourceJobStore.class.getName()); } 详细介绍请参见 SchedulerFactoryBean 方法 setDataSource(DataSource)的javadoc: ...
if (this.dataSource !=null) { mergedProps.put(StdSchedulerFactory.PROP_JOB_STORE_CLASS, LocalDataSourceJobStore.class.getName()); } // Make sure to set the scheduler name as configured in the Spring configuration. if (this.schedulerName !=null) { ...