首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何为Spring Integration Web Service入站网关配置uri地址?

如何为Spring Integration Web Service入站网关配置uri地址?
EN

Stack Overflow用户
提问于 2017-01-13 12:20:43
回答 1查看 242关注 0票数 1

您知道如何配置Spring Integration Web服务入站网关的uri吗?目前,我必须使用defaultEndpoint。

下面是我的配置:

代码语言:javascript
复制
<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,但不理解。

当我有两个入站网关时,我需要做什么?

谢谢并致以最良好的问候,

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2017-01-13 12:47:01

哦,这很简单!

For @Bean

代码语言:javascript
复制
@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

代码语言:javascript
复制
<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>

@-@

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/41627326

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档