簡體   English   中英

Spring XML Schema問題

[英]Spring XML Schema issue

以下是我的春季項目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集成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 

您(幾乎)應該始終在XML配置文件中引用無版本的XSD。 Spring將自動選擇Spring JAR中包含的版本。

有關更多詳細信息,請參見此答案

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM