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

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

jquery - javascript onscroll fade same class but with different div -