Spring+Quartz实现计划任务

环境:

1 Spring3.05

2 quartz 1.8.6 (由于Spring3.05与quartz 2.0不兼容,所以,还是选用quartz 1.8.6

3 eclipse 3.7

4 tomcat 7

5 jdk6

 

代码:

web.xml



  LeoWeb
 
  contextConfigLocation
  /WEB-INF/applicationContext.xml
 

 
  org.springframework.web.context.ContextLoaderListener
 

 

applicationContext.xml



 
 
  
  
    
 

 
  
  
 

 
  
   
    
   

  

 

 

HelloWorld.java

package com.leoweb.service;

public interface HelloWolrd {
 public void sayHello();
}

 

HelloWorldImpl.java

package com.leoweb.service.impl;

import com.leoweb.service.HelloWolrd;

public class HelloWorldImpl implements HelloWolrd {
 
 public HelloWorldImpl(){}

 @Override
 public void sayHello() {
  System.out.println("Hello World!");
 }

}

 

参考资料:

1 《Spring 2.0核心技术与最佳实践》,廖雪峰,电子工业出版社,2007年6月

2 《Spring Reference Documentation 3.0》

3 http://terracotta.org/downloads/open-source/destination?name=quartz-1.8.6.tar.gz&bucket=tcdistributions&file=quartz-1.8.6.tar.gz

4 http://topic.csdn.net/u/20120327/23/847ba00d-b7bc-48ec-aa0a-5a153194b392.html

5 http://www.iteye.com/problems/75479

你可能感兴趣的:(软件开发,quartz,spring,documentation,class,encoding,reference)