spring配置quartz 多任务
这是我的一个测试,我配的2个任务。
spring 的配置:
<!-- 与quartz有关的设置 --><bean id="billJob" lazy-init="false" name="code">public class MainTest extends TestCase {public void testJob(){System.out.println("start");ApplicationContext context = new FileSystemXmlApplicationContext("./config/spring.xml");System.out.println("end");}}
public class Main {/** * @param args */public static void main(String[] args) {// TODO Auto-generated method stubSystem.out.println("start");ApplicationContext context = new FileSystemXmlApplicationContext("./config/spring.xml");System.out.println("end");}}
public class ExceptionJob {public void run(){System.out.println("ExceptionJob running");}}