出站网关不允许如何解析http-method

时间:2016-11-25 07:15:41

标签: java spring spring-integration integration

您好我正在将一个Spring-integration Web应用程序部署到apache-tomcat-8.0.36:maven依赖是:

 <dependency>
          <groupId>org.springframework.integration</groupId>
          <artifactId>spring-integration-core</artifactId>
          <version>4.3.5.RELEASE</version>
</dependency>

但是我在部署应用程序时遇到以下异常:

org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 89 in XML document from ServletContext resource [/WEB-INF/spring/application-context.xml] is invalid; nested exception is org.xml.sax.SAXParseException; lineNumber: 89; columnNumber: 100; cvc-complex-type.3.2.2: Attribute 'http-method' is not allowed to appear in element 'int-http:outbound-gateway'.
    at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:399) ~[spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE]

我还可以在战争的WEB-INF / lib文件夹中看到spring-integration-core-4.3.5.RELEASE.jar。

2 个答案:

答案 0 :(得分:1)

确保将spring-integration-httpspring-integration-core添加到您的依赖项。

<dependency>
    <groupId>org.springframework.integration</groupId>
    <artifactId>spring-integration-http</artifactId>
    <version>4.3.5.RELEASE</version>
</dependency>

答案 1 :(得分:0)

您需要为pom.xml添加一个额外的依赖项:

<dependency>
    <groupId>org.springframework.integration</groupId>
    <artifactId>spring-integration-http</artifactId>
    <version>4.3.5.RELEASE</version>
</dependency>