spring-middleware.xml
970 Bytes
<?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:task="http://www.springframework.org/schema/task"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task.xsd">
<task:scheduler id="taskScheduler" pool-size="5"></task:scheduler>
<bean id="httpClientFactory" class="org.springframework.http.client.SimpleClientHttpRequestFactory">
<property name="connectTimeout" value="2000"/>
<property name="readTimeout" value="3000"/>
</bean>
<!--RestTemplate-->
<bean id="restClient" class="org.springframework.web.client.RestTemplate" scope="prototype">
<constructor-arg ref="httpClientFactory"/>
</bean>
</beans>