나는 http-inbound-gateway를 가지고 있으며 인바운드 채널을 페이로드로 채우기 위해 요청 매개 변수를 검색하려고합니다. http-inbound-gateway는 스프링 표현식을 지원하므로 #requestParams를 사용하여 요청 매개 변수를 검색 할 수 있습니다. #requestParams는 Map을 반환하는 request.getParameters ('key')와 같지만 String을 반환하는 request.getParameter ('key')를 호출 할 것으로 예상됩니다. 현재이 문제를 해결하려면 새 문자열 (#requestParams [ 'key'])을 사용해야합니다. 이 작업을 수행하는 더 좋은 방법이 있습니까?스프링 통합으로 요청 매개 변수를 검색하는 방법 spring-el에 의해 http-inbound-gateway?
<int-http:inbound-gateway path="/mypath"
supported-methods="GET" payload-expression="new String(#requestParams['key']?:'')"
request-channel="inboundChannel" reply-channel="outboundChannel"
error-channel="errorChannel"
message-converters="stringHttpMessageConverterUsingUtf8">
</int-http:inbound-gateway>
감사합니다. 좋은 제안입니다. – Hippoom