2016-07-06 7 views
0

Ich bemerkte, dass Frühling Integration verwenden, um ein Attribut "Pfad" im Elemente "inbound-Gateway", wie in der Dokumentation berichten:Frühling Integration HTTP: inkonsistentes Attribut "Pfad" für das Element "inbound-Gateway"

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

Aber in der XSD von HTTP Integration der "Pfad" Attribut nicht existiert:

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> 

Dies scheint die Liste der "akzeptiert" werden Attribute:

name 
extract-reply-payload 
supported-methods 
view 
request-mapper 
request-key 
reply-key 
reply-timeout 

Das Attribut "Pfad" ist in der Definition nicht vorhanden.

Der Effekt ist, dass ich zu Beginn der Anwendung einen Fehler haben:

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". 

Dies ist die „inkriminierten“ Teil der Konfiguration:

<int-http:inbound-gateway request-channel="receiveChannel" 
         path="/receiveGateway" 
         supported-methods="POST"/> 

Diese inkonsistent ist! Vielleicht fehlt etwas?

Antwort

0

Ich will nicht über das Internet, aus dem Frühjahr Integration Version Sie, dass XSD zeigen suchen, aber das ist wirklich alt genug, und es ist auf jeden Fall vorhanden path Attribut in den aktuellen und vielen früheren Versionen:

<xsd:attributeGroup name="inboundCommonAttributes"> 
    <xsd:attribute name="path" type="xsd:string"> 
     <xsd:annotation> 
      <xsd:documentation> 
       Comma-separated URI paths (e.g., /orderId/{order}). 
       Ant-style path patterns are also supported (e.g. /myPath/*.do). 
      </xsd:documentation> 
     </xsd:annotation> 
    </xsd:attribute> 

Bitte denken Sie daran, Spring Nature in Ihrem Eclipse zu aktivieren, damit es XSDs aus dem Projekt im Projekt und nicht aus dem Internet lesen kann.