Skip to content

Instantly share code, notes, and snippets.

View JesseYan's full-sized avatar
🏠
Working from home

晏佳益 JesseYan

🏠
Working from home
View GitHub Profile
@JesseYan
JesseYan / AutowiringSpringBeanJobFactory.java
Created March 28, 2017 09:32 — forked from jelies/AutowiringSpringBeanJobFactory.java
Quartz (2.1.6) java config with spring (3.2.1). Using a SpringBeanJobFactory to automatically autowire quartz classes.
package com.jelies.spring3tomcat7.config.quartz;
import org.quartz.spi.TriggerFiredBundle;
import org.springframework.beans.factory.config.AutowireCapableBeanFactory;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
import org.springframework.scheduling.quartz.SpringBeanJobFactory;
/**
* This JobFactory autowires automatically the created quartz bean with spring @Autowired dependencies.