spring integration http outbound adapter not resolving properties -
we using http outbound adapter make http request , want read url properties file changes envt envt. append other path url using message payload giving error message "caused by: java.lang.illegalargumentexception: map has no value url". need read base url properties file , generate final url payload.
here our sample config looks like
<int-http:outbound-gateway request-channel="requestchannel" url="${url}/{payload}" http-method="get" expected-response-type="java.lang.string" > </int-http:outbound-gateway>
actually {payload}
in url uri variable , can't resolved automatically. see how works:
uricomponentsbuilder.fromuristring(uri).buildandexpand(urivariables)
where urivariables
map
uri variables.
so, in case expected configuration must this:
<int-http:outbound-gateway request-channel="requestchannel" url="${url}/{payload}" http-method="get" expected-response-type="java.lang.string"> <int-http:uri-variable name="payload" expression="payload"/> </int-http:outbound-gateway>
more information can find in reference manual.
Comments
Post a Comment