关键步骤:
1. 配置 SchedulerFactoryBean
<bean class="org.springframework.scheduling.quartz.SchedulerFactoryBean"></bean>
2. 获取 SchedulerFactoryBean
ApplicationContext ctx = WebApplicationContextUtils.getWebApplicationContext(servletContext); SchedulerFactoryBean bean = (SchedulerFactoryBean)ctx.getBean(t) ;
时间: 2024-10-29 19:05:43