0
我注意到,Spring集成在元素「入站網關」使用屬性「路徑」,作爲報告的文檔中的元素「入站網關」:Spring集成HTTP:不一致的屬性「路徑」爲
http://docs.spring.io/spring-integration/reference/html/http.html#_request_mapping_support
但在HTTP一體化XSD的「路徑」屬性不存在:
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"/>
這是不一致的! 也許丟失了一些東西?