gpt4 book ai didi

xsd - Spring Integration http 出站网关

转载 作者:行者123 更新时间:2023-12-01 16:09:18 27 4
gpt4 key购买 nike

我正在尝试使用 Spring Integration http 出站网关,但我似乎遇到了与架构相关的错误。错误是:

cvc-complex-type.3.2.2: Attribute 'expected-response-type' is not allowed to appear in element 'int-http:outbound-gateway'. sprint-servlet.xml  /sprint/src/main/webapp/WEB-INF line 28
cvc-complex-type.3.2.2: Attribute 'url' is not allowed to appear in element 'int-http:outbound-gateway'. sprint-servlet.xml /sprint/src/main/webapp/WEB-INF line 28
cvc-complex-type.3.2.2: Attribute 'http-method' is not allowed to appear in element 'int-http:outbound-gateway'. sprint-servlet.xml /sprint/src/main/webapp/WEB-INF line 28
cvc-complex-type.3.2.2: Attribute 'reply-timeout' is not allowed to appear in element 'int-http:outbound-gateway'. sprint-servlet.xml /sprint/src/main/webapp/WEB-INF line 28

XSD 似乎不接受这些属性。但是,我只是从 Spring Integration 文档中复制/粘贴了它。这是我的 XML 配置文件的相关部分:

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:int="http://www.springframework.org/schema/integration"
xmlns:int-http="http://www.springframework.org/schema/integration/http"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.0.xsd
http://www.springframework.org/schema/integration http://www.springframework.org/schema/integration/spring-integration.xsd
http://www.springframework.org/schema/integration/http http://www.springframework.org/schema/integration/http/spring-integration-http.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.0.xsd
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-4.0.xsd">



<!-- Spring Integration stuff -->
<int:channel id="requests">
</int:channel>
<int:channel id="replies"/>

<int-http:outbound-gateway id="example"
request-channel="requests"
url="http://localhost/test"
http-method="POST"
expected-response-type="java.lang.String"
charset="UTF-8"
reply-timeout="1234"
reply-channel="replies"/>

有什么明显的地方我做错了吗?

谢谢,蒂姆

最佳答案

spring-integration-httpspring-integration-core 添加到您的依赖项中。

应该可以

关于xsd - Spring Integration http 出站网关,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23242628/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com