spring-middleware.xml
1.4 KB
<?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"
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.1.xsd
http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">
<!-- <task:scheduler id="taskScheduler" pool-size="5"></task:scheduler>
<task:annotation-driven scheduler="taskScheduler"/>-->
<!-- <bean id="task" class="com.monitor.middleware.rabbitmq.task.MonitTask"></bean>
<task:scheduled-tasks>
<task:scheduled ref="task" method="doTask" fixed-rate="1000"/>
</task:scheduled-tasks>-->
<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>