gpt4 book ai didi

java - Spring XML 架构问题

转载 作者:太空宇宙 更新时间:2023-11-04 13:42:19 25 4
gpt4 key购买 nike

下面是我的 spring 项目 spring.xml 中使用的示例 xml

我想删除 spring 版本示例 spring-integration-xml-4.1.xsd应替换为 spring-integration-xml.xsd

但是当尝试时 http://www.springframework.org/schema/integration/xml/spring-integration-xml.xsd互联网返回 spring intetegration 1.0 xsd 它应该返回新模式我的 xml 标签中的 4.1 是基于 4.1 的,所以如果我仅添加 spring-integration-xml.xsd

http://www.springframework.org/schema/beans/spring-beans-4.1.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-4.1.xsd
http://www.springframework.org/schema/integration
http://www.springframework.org/schema/integration/spring-integration-4.1.xsd
http://www.springframework.org/schema/integration/stream
http://www.springframework.org/schema/integration/stream/spring-integration-stream-4.1.xsd
http://www.springframework.org/schema/integration/file
http://www.springframework.org/schema/integration/file/spring-integration-file-4.1.xsd
http://www.springframework.org/schema/integration/xml
http://www.springframework.org/schema/integration/xml/spring-integration-xml-4.1.xsd
http://www.springframework.org/schema/web-services
http://www.springframework.org/schema/web-services/web-services-2.0.xsd
http://www.springframework.org/schema/oxm
http://www.springframework.org/schema/oxm/spring-oxm-4.1.xsd
http://www.springframework.org/schema/integration/jms
http://www.springframework.org/schema/integration/jms/spring-integration-jms-4.1.xsd
http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task-4.1.xsd">

Like http://www.springframework.org/schema/integration/xml
http://www.springframework.org/schema/integration/xml/spring-integration-xml-4.1.xsd
need to remove version 4.1

最佳答案

您应该(几乎)始终在 XML 配置文件中引用无版本 XSD; Spring 将自动选择 Spring JAR 中包含的版本。

参见this answer for more details .

关于java - Spring XML 架构问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31134513/

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