个人搭建框架:
pom.xml:
4.0.0 com.renmaiweb lbs war 1.0-SNAPSHOT Location Service of BS http://www.renmaiweb.com lbs junit junit 3.8.1 test org.json json 20141113 mysql mysql-connector-java 5.1.35 commons-dbcp commons-dbcp 1.3 javax.servlet servlet-api 3.0-alpha-1 commons-lang commons-lang 2.4 commons-beanutils commons-beanutils 1.9.1 net.sf.ezmorph ezmorph 1.0.5 org.springframework spring-webmvc 3.2.8.RELEASE org.springframework spring-test 3.2.8.RELEASE org.springframework spring-context-support 3.2.8.RELEASE c3p0 c3p0 0.9.1.2 org.springframework spring-jdbc 4.1.6.RELEASE com.github.stephenc.eaio-uuid uuid 3.2.0 net.sf.json-lib json-lib 2.4 jdk15 org.apache.httpcomponents httpclient 4.4.1 junit junit 4.12 org.apache.httpcomponents httpmime 4.4.1 org.apache.httpcomponents httpcore 4.4.1 org.quartz-scheduler quartz 2.2.0
web.xml
contextConfigLocation classpath:applicationContext*.xml org.springframework.web.context.ContextLoaderListener springMvc org.springframework.web.servlet.DispatcherServlet contextConfigLocation classpath:spring-mvc.xml 1 springMvc *.do
application。xml
quartz对应的实体类:
package com.renmaiweb.lbs.quartz;import java.util.Date;public class RegularlyJob { public void work(){ System.out.println("当前时间:"+new Date().toString()); }}