首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Spring Integration HTTP:元素"inbound-gateway“的属性"path”不一致

Spring Integration HTTP:元素"inbound-gateway“的属性"path”不一致
EN

Stack Overflow用户
提问于 2016-07-06 18:07:53
回答 0查看 705关注 0票数 1

我注意到Spring Integration在元素"inbound-gateway“中使用了属性"path”,如文档中所述:

http://docs.spring.io/spring-integration/reference/html/http.html#_request_mapping_support

但是在HTTP集成的XSD中,"path“属性并不存在:

代码语言:javascript
复制
http://www.springframework.org/schema/integration/http/spring-integration-http.xsd

<xsd:element name="inbound-gateway">
    <xsd:complexType>
        <xsd:annotation>
            <xsd:documentation>Defines an inbound HTTP-based Messaging Gateway.</xsd:documentation>
        </xsd:annotation>
        <xsd:complexContent>
            <xsd:extension base="gatewayType">
                <xsd:attribute name="name" type="xsd:string"/>
                <xsd:attribute name="extract-reply-payload" type="xsd:string" default="true"/>
                <xsd:attribute name="supported-methods" type="xsd:string"/>
                <xsd:attribute name="view" type="xsd:string">
                    <xsd:annotation>
                        <xsd:appinfo>
                            <tool:annotation kind="ref">
                                <tool:expected-type type="org.springframework.web.servlet.View"/>
                            </tool:annotation>
                        </xsd:appinfo>
                    </xsd:annotation>
                </xsd:attribute>
                <xsd:attribute name="request-mapper" type="xsd:string">
                    <xsd:annotation>
                        <xsd:appinfo>
                            <tool:annotation kind="ref">
                                <tool:expected-type type="org.springframework.integration.http.InboundRequestMapper"/>
                            </tool:annotation>
                        </xsd:appinfo>
                    </xsd:annotation>
                </xsd:attribute>
                <xsd:attribute name="request-key" type="xsd:string"/>
                <xsd:attribute name="reply-key" type="xsd:string"/>
                <xsd:attribute name="reply-timeout" type="xsd:string"/>
            </xsd:extension>
        </xsd:complexContent>
    </xsd:complexType>
</xsd:element>

这似乎是“接受”属性的列表:

代码语言:javascript
复制
name
extract-reply-payload
supported-methods
view
request-mapper
request-key
reply-key
reply-timeout

"path“属性在定义中不存在。

结果是我在应用程序开始时出现了一个错误:

代码语言:javascript
复制
org.xml.sax.SAXParseException; lineNumber: 71; columnNumber: 53; cvc-complex-type.3.2.2: Attribute "path" is not allowed to appear in element "int-http:inbound-gateway".

这是配置的“被牵连”部分:

代码语言:javascript
复制
<int-http:inbound-gateway request-channel="receiveChannel"
                      path="/receiveGateway"
                      supported-methods="POST"/>

这是不一致的!也许有什么东西遗漏了?

EN

回答

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

https://stackoverflow.com/questions/38221394

复制
相关文章

相似问题

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