|
@@ -6,12 +6,14 @@
|
|
|
xmlns:context="http://www.springframework.org/schema/context"
|
|
xmlns:context="http://www.springframework.org/schema/context"
|
|
|
xmlns:jee="http://www.springframework.org/schema/jee"
|
|
xmlns:jee="http://www.springframework.org/schema/jee"
|
|
|
xmlns:tx="http://www.springframework.org/schema/tx"
|
|
xmlns:tx="http://www.springframework.org/schema/tx"
|
|
|
|
|
+ xmlns:task="http://www.springframework.org/schema/task"
|
|
|
xsi:schemaLocation="
|
|
xsi:schemaLocation="
|
|
|
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-4.0.xsd
|
|
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-4.0.xsd
|
|
|
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.0.xsd
|
|
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.0.xsd
|
|
|
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.0.xsd
|
|
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.0.xsd
|
|
|
http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee-4.0.xsd
|
|
http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee-4.0.xsd
|
|
|
- http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-4.0.xsd">
|
|
|
|
|
|
|
+ http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-4.0.xsd
|
|
|
|
|
+ http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task-3.0.xsd">
|
|
|
|
|
|
|
|
<!-- <context:property-placeholder location="classpath:jdbc.properties" /> -->
|
|
<!-- <context:property-placeholder location="classpath:jdbc.properties" /> -->
|
|
|
<!-- 设置需要进行Spring注解扫描的类包 -->
|
|
<!-- 设置需要进行Spring注解扫描的类包 -->
|
|
@@ -53,7 +55,6 @@
|
|
|
|
|
|
|
|
</bean>
|
|
</bean>
|
|
|
|
|
|
|
|
-
|
|
|
|
|
<!-- 配置Jdbc模板 -->
|
|
<!-- 配置Jdbc模板 -->
|
|
|
<bean id="namedParameterJdbcTemplate" class="org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate" scope="prototype">
|
|
<bean id="namedParameterJdbcTemplate" class="org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate" scope="prototype">
|
|
|
<constructor-arg ref="dataSource"></constructor-arg>
|
|
<constructor-arg ref="dataSource"></constructor-arg>
|
|
@@ -97,4 +98,12 @@
|
|
|
<aop:advisor advice-ref="txAdvice" pointcut-ref="serviceOperation" />
|
|
<aop:advisor advice-ref="txAdvice" pointcut-ref="serviceOperation" />
|
|
|
</aop:config>
|
|
</aop:config>
|
|
|
|
|
|
|
|
|
|
+
|
|
|
|
|
+ <!-- 定时器 这个是定时器要调用方法的类 -->
|
|
|
|
|
+ <bean id="job1" class="com.happy.action.hotelCoupomAction" />
|
|
|
|
|
+ <!-- 定义调用对象和调用对象的方法 -->
|
|
|
|
|
+<!-- <task:scheduled-tasks>-->
|
|
|
|
|
+<!-- <!– 调用的类job1调用类中的方法execute 这里表示的是每10秒执行一次 –>-->
|
|
|
|
|
+<!-- <task:scheduled ref="job1" method="setCoupomStatus" cron="0/10 * * * * ?" />-->
|
|
|
|
|
+<!-- </task:scheduled-tasks>-->
|
|
|
</beans>
|
|
</beans>
|