Fix HTTP out DSL for uri variables propagation

Since `AbstractHttpRequestExecutingMessageHandler` does a copy of
the provided `uriVariableExpressions`, we lose a coupling propagating
from the ctor.

* Move `uriVariableExpressions` propagation from the ctor to the
`getComponentsToRegister()`
This commit is contained in:
Artem Bilan
2017-03-28 11:33:00 -04:00
parent 85aead337f
commit 75fe5d0f72
2 changed files with 15 additions and 14 deletions

View File

@@ -183,11 +183,8 @@ public class HttpDslTests {
return IntegrationFlows
.from(Http.inboundGateway("/service")
.requestMapping(r -> r.params("name")))
.handle(Http.<MultiValueMap<String, String>>outboundGateway(m ->
UriComponentsBuilder.fromPath("/service/internal")
.queryParams(m.getPayload())
.build()
.toUri())
.handle(Http.<MultiValueMap<String, String>>outboundGateway("/service/internal?{params}")
.uriVariable("params", "payload")
.expectedResponseType(String.class),
e -> e.id("serviceInternalGateway"))
.get();