本文整理汇总了Java中org.springframework.scheduling.quartz.SpringBeanJobFactory类的典型用法代码示例。如果您正苦于以下问题:Java SpringBeanJobFactory类的具体用法?Java SpringBeanJobFactory怎么用?Java SpringBeanJobFactory使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
SpringBeanJobFactory类属于org.springframework.scheduling.quartz包,在下文中一共展示了SpringBeanJobFactory类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: springBeanJobFactory
import org.springframework.scheduling.quartz.SpringBeanJobFactory; //导入依赖的package包/类
@Bean
public SpringBeanJobFactory springBeanJobFactory(ApplicationContext applicationContext)
{
AutowiringSpringBeanJobFactory jobFactory = new AutowiringSpringBeanJobFactory();
jobFactory.setApplicationContext(applicationContext);
return jobFactory;
}
示例2: scheduler
import org.springframework.scheduling.quartz.SpringBeanJobFactory; //导入依赖的package包/类
@Bean
public Scheduler scheduler() throws Exception {
SchedulerFactoryBean factory = new SchedulerFactoryBean();
factory.setTriggers(new Trigger[] { jobDetailTrigger() });
factory.setJobFactory(new SpringBeanJobFactory());
factory.setDataSource(dataSource());
factory.setSchedulerContextAsMap(new HashMap<String, Object>() {{
put("job", job());
put("jobLauncher", jobLauncher);
}});
factory.afterPropertiesSet();
return factory.getObject();
}
示例3: springBeanJobFactory
import org.springframework.scheduling.quartz.SpringBeanJobFactory; //导入依赖的package包/类
@Bean
public SpringBeanJobFactory springBeanJobFactory() {
AutowiringSpringBeanJobFactory jobFactory = new AutowiringSpringBeanJobFactory();
jobFactory.setApplicationContext(applicationContext);
return jobFactory;
}
示例4: jobFactory
import org.springframework.scheduling.quartz.SpringBeanJobFactory; //导入依赖的package包/类
@Bean
public JobFactory jobFactory() {
return new SpringBeanJobFactory();
}