Spring 无缝整合 quartz

关键步骤:

1. 配置 SchedulerFactoryBean

<bean class="org.springframework.scheduling.quartz.SchedulerFactoryBean"></bean>

 

2. 获取 SchedulerFactoryBean

ApplicationContext ctx = WebApplicationContextUtils.getWebApplicationContext(servletContext);

SchedulerFactoryBean bean = (SchedulerFactoryBean)ctx.getBean(t) ;

 

posted @ 2017-09-25 16:31  xiluhua  阅读(214)  评论(0编辑  收藏  举报