准备工作 下载quartz和spring相应的包
 
1.编写测试类
public class SimpleService implements Serializable {        
         private static final long serialVersionUID = 122323233244334343L;
         private static final Log logger = LogFactory.getLog(SimpleService. class);
         public void testMethod1(){
                 //这里执行定时调度业务 便于显示明细添加些特殊符号
                logger.info( "testMethod1...@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@....1");
        }
         public void testMethod2(){
                logger.info( "testMethod2....###################################################!!!!!!!!!!!!!!!!!!!!...2");
        }
}        
2. 开始配置spring。
(1)配置spring的数据源

        "dataSource"
                 class= "org.apache.commons.dbcp.BasicDataSource">
                "driverClassName">
                        com.mysql.jdbc.Driver
                

                "url">
                        jdbc:mysql: //127.0.0.1:3306/going
                

                "username">
                        root
                

                "password">
                        root
                

                "maxActive">
                        100
                

                "maxIdle">
                        2
                

                "maxWait">
                        1200
                

        

     
            

你可能感兴趣的:(java,spring,休闲,quartz框架使用)