I have configured timeouts for the HTTP Outbound Gateway providing a reference to a ClientHttpRequestFactory bean using the request-factory attribute:
<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>
But I want to load these attributes dynamically from DDBB (or programmatically) and not from Spring initial boot.
How can I do this?