如何解决 outbound-gateway 不允许使用 http-method
How to resolve http-method is not allowed for outbound-gateway
您好,我正在部署一个 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]
我还可以在 war.
的 WEB-INF/lib 文件夹中看到 spring-integration-core-4.3.5.RELEASE.jar
确保将 spring-integration-http
和 spring-integration-core
添加到依赖项中。
<dependency>
<groupId>org.springframework.integration</groupId>
<artifactId>spring-integration-http</artifactId>
<version>4.3.5.RELEASE</version>
</dependency>
您需要向 pom.xml 添加额外的依赖项:
<dependency>
<groupId>org.springframework.integration</groupId>
<artifactId>spring-integration-http</artifactId>
<version>4.3.5.RELEASE</version>
</dependency>
您好,我正在部署一个 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]
我还可以在 war.
的 WEB-INF/lib 文件夹中看到 spring-integration-core-4.3.5.RELEASE.jar确保将 spring-integration-http
和 spring-integration-core
添加到依赖项中。
<dependency>
<groupId>org.springframework.integration</groupId>
<artifactId>spring-integration-http</artifactId>
<version>4.3.5.RELEASE</version>
</dependency>
您需要向 pom.xml 添加额外的依赖项:
<dependency>
<groupId>org.springframework.integration</groupId>
<artifactId>spring-integration-http</artifactId>
<version>4.3.5.RELEASE</version>
</dependency>