1
- 配置集成使用石英2.2.2
- 春4.2.4.RELEASE
- 如何我的配置石英?只使用Anotation所有
- 開始我的系統正常
- 問題包括2的JobFactory系統
@Configuration(value = "springConfigContext")
@EnableAspectJAutoProxy
@EnableTransactionManagement
@ApplicationScoped
@EnableAsync
@EnableScheduling
@ComponentScan(basePackages = {"com", })
@ImportResource({ "classpath:springBeans.xml" })
@PropertySources({ @PropertySource("classpath:/META-INF/my_file_properties.properties") })
public class SpringConfigContext extends AnnotationConfigApplicationContext implements BeanFactory{
\t @Bean
\t public MethodInvokingJobDetailFactoryBean methodInvokingJobDetailFactoryBean(){
\t \t //my code
\t }
\t @Bean
\t public SimpleTriggerFactoryBean simpleTriggerFactoryBean(){
\t \t //my code
\t }
\t @Bean
\t public JobDetailFactoryBean jobDetailFactoryBean(){
\t \t //my code
\t }
\t @Bean
\t public CronTriggerFactoryBean cronTriggerFactoryBean() throws ParseException{
\t \t //my code
\t }
\t @Bean(name = "springQuartzScheduler")
\t public SchedulerFactoryBean schedulerFactoryBean() throws Exception{
\t SchedulerFactoryBean scheduler = new SchedulerFactoryBean();
\t \t CronTrigger trigger = cronTriggerFactoryBean().getObject();
\t \t scheduler.setTriggers(simpleTriggerFactoryBean().getObject(), trigger);
\t \t Properties propertie = new Properties();
\t \t propertie.setProperty("org.quartz.threadPool.threadCount", "3");
\t \t propertie.setProperty("org.quartz.threadPool.threadPriority", "3");
\t \t scheduler.setQuartzProperties(propertie);
\t \t scheduler.setOverwriteExistingJobs(true);
\t \t scheduler.setApplicationContext(this);
\t \t scheduler.start();
\t \t return scheduler;
\t }
}
第一內建的方法public SchedulerFactoryBean來的SchedulerFactoryBean() 第二內建於其他類,春節我是想!
石英晶我的配置屬性是:
org.quartz.scheduler.skipUpdateCheck=true
org.quartz.scheduler.instanceName=schedulerFactoryBean
org.quartz.scheduler.jobFactory.class=org.springframework.scheduling.quartz.AdaptableJobFactory
org.quartz.threadPool.class=org.quartz.simpl.SimpleThreadPool
org.quartz.threadPool.threadCount=5
org.quartz.threadPool.threadPriority=5
我嘗試用豆 「springQuartzScheduler」 或SchedulerFactoryBean來,但開不工作的相同的名稱。
的圖像參數如何使用只有一個工廠?