简体   繁体   English

Spring XML Schema问题

[英]Spring XML Schema issue

below is the sample xml which is used in my spring project spring.xml 以下是我的春季项目spring.xml中使用的示例XML

I want to remove spring version example spring-integration-xml-4.1.xsd should replace with spring-integration-xml.xsd 我想删除spring版本示例spring-integration-xml-4.1.xsd应该替换为spring-integration-xml.xsd

But when tried for http://www.springframework.org/schema/integration/xml/spring-integration-xml.xsd internet return spring intetegration 1.0 xsd it should return new schema which is 4.1 s in my xml tags are based on 4.1 so its not working if i add only spring-integration-xml.xsd 但是,当尝试使用http://www.springframework.org/schema/integration/xml/spring-integration-xml.xsd互联网返回spring集成1.0 xsd时,它应该返回4.1 s的新模式,而我的xml标记基于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 

You should (almost) always refer to versionless XSDs in your XML configuration files; 您(几乎)应该始终在XML配置文件中引用无版本的XSD。 Spring will pick up the version included in the Spring JARs automatically. Spring将自动选择Spring JAR中包含的版本。

See this answer for more details . 有关更多详细信息,请参见此答案

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM