我注意到Spring Integration在元素"inbound-gateway“中使用了属性"path”,如文档中所述:
http://docs.spring.io/spring-integration/reference/html/http.html#_request_mapping_support
但是在HTTP集成的XSD中,"path“属性并不存在:
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>这似乎是“接受”属性的列表:
name
extract-reply-payload
supported-methods
view
request-mapper
request-key
reply-key
reply-timeout"path“属性在定义中不存在。
结果是我在应用程序开始时出现了一个错误:
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".这是配置的“被牵连”部分:
<int-http:inbound-gateway request-channel="receiveChannel"
path="/receiveGateway"
supported-methods="POST"/>这是不一致的!也许有什么东西遗漏了?
https://stackoverflow.com/questions/38221394
复制相似问题