spring配置文件報警告[No grammar constraints (DTD or XML Schema) referenced in the document.]


其實是ide的xml validater未找到配置文件中引用xsd文件,可以設置忽略驗證,也可以選擇進行驗證:一可是單獨去下載這些xsd文件,二可直接用spring的jar包中的xsd文件。

 

要使用jar中的xsd文件需要這樣:jar:file:/F:/apache/maven-repo/org/springframework/spring-beans/4.3.0.RELEASE/spring-beans-4.3.0.RELEASE.jar!/org/springframework/beans/factory/xml/spring-beans-4.3.xsd

當然,也可以直接在ide的配置文件里更改,我用的eclipse是在工作空間下的.metadata\.plugins\org.eclipse.wst.xml.core\user_catalog.xml 中添加:

<system systemId="http://www.springframework.org/schema/beans/spring-beans-4.3.xsd" uri="jar:file:/F:/apache/maven-repo/org/springframework/spring-beans/4.3.0.RELEASE/spring-beans-4.3.0.RELEASE.jar!/org/springframework/beans/factory/xml/spring-beans-4.3.xsd"/>

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM