以下是我的春季项目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
Internet return 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 Schema问题,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/31134513/

10-10 12:25
查看更多