1
我想發送一個cookie作爲HTTP服務請求的一部分。該cookie的名稱是_br_uid_2,並且cookie的值應該是有效內容對象的customerId屬性。向彈簧集成請求添加動態cookie
的服務配置,像這樣:
<int:channel id="InChannelBr"></int:channel>
<int:channel id="OutChannelBr"></int:channel>
<!-- Gateway Start -->
<int:gateway id="BloomreachGateway" default-request-timeout="5000" default-reply-timeout="5000"
default-request-channel="InChannelBr" service-interface="com.someco.service.BloomreachSpringService">
<int:method name="getSearchResults" request-channel="InChannelBr" reply-channel="OutChannelBr" />
</int:gateway>
<int-http:outbound-gateway id="locationBloomreachGateway"
request-channel="InChannelBr"
reply-channel="OutChannelBr"
url="${bloomreach_search_url}?account_id=${br_account_id}&auth_key=${br_auth_key}&domain_key=${br_domain_key}&url=${br_url}&request_type=${br_request_type}&br_origin=${br_origin}&search_type=${br_search_type}&fl=${br_field_list}{urlParams}&facet.range=${br_price_range}"
http-method="GET"
encode-uri="false"
transfer-cookies="true"
reply-timeout='5000'
expected-response-type="com.someco.BloomreachSearchResponse"
message-converters="brJsonConverter"
uri-variables-expression="@brUriVariablesBean.populate(payload)">
</int-http:outbound-gateway>
這似乎是一個共同的願望,但我沒有看到任何明確的文件。我看着變形金剛和標題精靈。
有人能告訴我如何更新Spring服務定義,以便它發送payload.getCustomerId()作爲_br_uid_2 cookie的值嗎?
謝謝! Bobby