我有两个int HTTP:入站网关与路径below.when我打电话提到
http://localhost:8080/XYZ/ABCService/query -- i expected to call http:inbound-gateway with id ="XYZ"
http://localhost:8080/ABCService/query - i expected to call http:inbound-gateway with id ="default"
但其时我给请求没有一致性什么happing http://localhost:8080/XYZ/ABCService/query
它呼吁“默认” gateway.i了解,因为道路的/*Serivce.But我想知道能不能我给一些顺序或优先级或某种URL映射说经常检查“XYZ”第一,然后选中“默认”
我使用的DispatcherServlet。
<int-http:inbound-gateway id="default"
path="/*Service/query"
request-channel="RequestChannel" reply-channel="ResponseChannel"
supported-methods="POST" reply-timeout="5000" request-payload-type="java.lang.String"
error-channel="ErrorChannel" mapped-request-headers="xyz-*, HTTP_REQUEST_HEADERS">
</int-http:inbound-gateway>
<int-http:inbound-gateway id="XYZ"
path="/XYZ/*Service/query"
request-channel="RequestChannel" reply-channel="XYZResponseChannel"
supported-methods="POST" reply-timeout="5000" request-payload-type="java.lang.String"
error-channel="ErrorChannel" mapped-request-headers="xyz-*, HTTP_REQUEST_HEADERS">
<int-http:header name="reply-type" expression="'ABC'" />
</int-http:inbound-gateway>
<int:channel id="ResponseChannel">
</int:channel>
<int:header-value-router input-channel="ResponseChannel"
header-name="reply-type">
<int:mapping value="ABC" channel="XYZResponseChannel" />
</int:header-value-router>