|
|
@@ -2,11 +2,14 @@
|
|
|
<beans xmlns="http://www.springframework.org/schema/beans"
|
|
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
|
xmlns:context="http://www.springframework.org/schema/context"
|
|
|
+ xmlns:task="http://www.springframework.org/schema/task"
|
|
|
xsi:schemaLocation="
|
|
|
http://www.springframework.org/schema/beans
|
|
|
http://www.springframework.org/schema/beans/spring-beans.xsd
|
|
|
http://www.springframework.org/schema/context
|
|
|
- http://www.springframework.org/schema/context/spring-context.xsd">
|
|
|
+ http://www.springframework.org/schema/context/spring-context.xsd
|
|
|
+ http://www.springframework.org/schema/task
|
|
|
+ http://www.springframework.org/schema/task/spring-task.xsd">
|
|
|
|
|
|
<!-- 装载service -->
|
|
|
<context:component-scan base-package="**.service" />
|
|
|
@@ -14,4 +17,8 @@
|
|
|
<!-- 启动时初始化Spring上下文环境工具类 -->
|
|
|
<bean id="springContextUtil" class="com.zheng.common.util.SpringContextUtil"></bean>
|
|
|
|
|
|
+ <!-- 启动任务注解 -->
|
|
|
+ <task:annotation-driven />
|
|
|
+ <context:component-scan base-package="**.task" />
|
|
|
+
|
|
|
</beans>
|