Spring XML Schema问题

时间:2015-06-30 09:30:36

标签: java spring xsd

下面是我的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 

1 个答案:

答案 0 :(得分:0)

您应该(几乎)总是在XML配置文件中引用无版本的XSD; Spring将自动获取Spring JAR中包含的版本。

请参阅this answer for more details