【发布时间】:2015-08-03 17:58:24
【问题描述】:
我已经为 HTTP 出站网关配置了超时,使用 request-factory 属性提供对 ClientHttpRequestFactory bean 的引用:
<int-http:outbound-gateway request-channel="channelGetByCustomer"
request-factory="requestFactoryGetByCustomer"
reply-channel="jsonToObjectChannel" url="${getbycustomer.endpoint.url}"
http-method="GET" expected-response-type="com.mbracero.integration.dto.Item[]">
<int-http:uri-variable name="customerid" expression="payload.customerid"/>
</int-http:outbound-gateway>
<beans:bean id="requestFactoryGetByCustomer" class="org.springframework.http.client.SimpleClientHttpRequestFactory">
<beans:property name="connectTimeout" value="${getbycustomer.timeout}"/>
<beans:property name="readTimeout" value="${getbycustomer.timeout}"/>
</beans:bean>
但我想从 DDBB(或以编程方式)动态加载这些属性,而不是从 Spring 初始启动。
我该怎么做?
【问题讨论】:
标签: java spring spring-integration