12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- <?xml version="1.0" encoding="UTF-8"?>
- <beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:mvc="http://www.springframework.org/schema/mvc"
- xmlns:task="http://www.springframework.org/schema/task"
- xmlns:context="http://www.springframework.org/schema/context"
- xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
- http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd
- http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd
- http://www.springframework.org/schema/task
- http://www.springframework.org/schema/task/spring-task-3.0.xsd">
- <!-- 注解探测器 -->
- <mvc:annotation-driven />
- <context:component-scan base-package="com.kpt.controller" />
- <mvc:interceptors>
- <mvc:interceptor>
- <mvc:mapping path="/**/*.html" />
- <bean class="com.kpt.interceptor.MyInterceptor" />
- </mvc:interceptor>
- </mvc:interceptors>
- <bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
- <property name="viewClass" value="org.springframework.web.servlet.view.JstlView" />
- <property name="prefix" value="/" />
- <property name="suffix" value=".jsp" />
- </bean>
- <!-- Spring 上传下载设置 -->
- <!-- ========================================== -->
- <bean id="multipartResolver" class="org.springframework.web.multipart.commons.CommonsMultipartResolver">
- <property name="defaultEncoding" value="UTF-8" /> <!-- 默认编码 (ISO-8859-1) -->
- <property name="maxInMemorySize" value="10240" /> <!-- 最大内存大小 (10240) -->
- <property name="maxUploadSize" value="-1" /> <!-- 最大文件大小,-1为无限止(-1) -->
- </bean>
-
-
-
- <!-- Spring 定时器设置 -->
- <bean id="TodoCallService" class="com.kpt.service.impl.TodoCallService" />
- <task:scheduled-tasks>
- <!--每天凌晨1点运行一次-->
- <task:scheduled ref="TodoCallService" method="callGetFeedPriceByDate" cron="0 0 01 * * ?" />
- </task:scheduled-tasks>
-
- </beans>
|