Spring整合的quartz任务调度的实现方式 (二)

2014-11-24 10:36:23 · 作者: · 浏览: 1
println(newDate());

}

}

其次:在Spring的配置文件进行配置,配置代码如下:

< xmlversion="1.0"encoding="UTF-8" >

xmlns:context="http://www.springframework.org/schema/context"

xmlns:aop="http://www.springframework.org/schema/aop"

xmlns:tx="http://www.springframework.org/schema/tx"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xsi:schemaLocation="http://www.springframework.org/schema/beans

http://www.springframework.org/schema/beans/spring-beans-2.5.xsd

http://www.springframework.org/schema/context

http://www.springframework.org/schema/context/spring-context-2.5.xsd

http://www.springframework.org/schema/tx

http://www.springframework.org/schema/tx/spring-tx-2.5.xsd

http://www.springframework.org/schema/aop

http://www.springframework.org/schema/aop/spring-aop-2.5.xsd">

cn.itcast.CodeCurDate

最后:在web.xml中配置相关数据

< xmlversion="1.0"encoding="UTF-8" >

xmlns="http://java.sun.com/xml/ns/javaee"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xsi:schemaLocation="http://java.sun.com/xml/ns/javaee

http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">

contextConfigLocation

/WEB-INF/classes/beans.xml

org.springframework.web.context.ContextLoaderListener