I have a spring integration configured to build a url from a property and some variables:
<int-http:outbound-gateway
url="${pdf.url}?id={id}&version={version}"
request-factory="int.http.requestFactory"
http-method="GET"
transfer-cookies="false"
header-mapper="fTokenHeaderMapper"
expected-response-type="java.lang.String" >
<int-http:uri-variable name="id" expression="payload.id"/>
<int-http:uri-variable name="version" expression="payload.version"/>
</int-http:outbound-gateway>
Now I want to change it so that the server part (pdf.url) could be changed on the fly and not only on startup. To achieve that I have changed from 'url' to 'url-expression' and something like this:
<int-http:outbound-gateway
url-expression="@configurationService.getConfiguration('pdf.url')?id={id}&version={version}"
request-factory="int.http.requestFactory"
http-method="GET"
transfer-cookies="false"
header-mapper="fTokenHeaderMapper"
expected-response-type="java.lang.String" >
<int-http:uri-variable name="id" expression="payload.id"/>
<int-http:uri-variable name="version" expression="payload.version"/>
</int-http:outbound-gateway>
This line seems to work:
url-expression="@configurationService.getConfiguration('pdf.url')"
But how do I include the variables in a similar way as the first example?