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