您知道如何配置Spring Integration Web服务入站网关的uri吗?目前,我必须使用defaultEndpoint。
下面是我的配置:
<ws:inbound-gateway id="inbound-gateway" request-channel="requestChannel" reply-channel="responseChannel" marshaller="hrMarshaller" unmarshaller="hrMarshaller"></ws:inbound-gateway>
<bean class="org.springframework.ws.server.endpoint.mapping.UriEndpointMapping">
<property name="defaultEndpoint" ref="inbound-gateway"/>
</bean>我读过Spring Integration,inbound gateway,但不理解。
当我有两个入站网关时,我需要做什么?
谢谢并致以最良好的问候,
发布于 2017-01-13 12:47:01
哦,这很简单!
For @Bean
@Bean
public UriEndpointMapping uriEndpointMapping() {
UriEndpointMapping uriEndpointMapping = new UriEndpointMapping();
uriEndpointMapping.setUsePath(true);
Map<String, Object> map = new HashMap<>();
map.put("/ws/abc", "cas-inbound-gateway");
uriEndpointMapping.setEndpointMap(map);
return uriEndpointMapping;
}对于XML
<bean class="org.springframework.ws.server.endpoint.mapping.UriEndpointMapping">
<property name="usePath" value="true"/>
<property name="endpointMap">
<map>
<entry key="/ws/abc" value="cas-inbound-gateway"></entry>
</map>
</property>
</bean>@-@
https://stackoverflow.com/questions/41627326
复制相似问题