Referenced file contains errors(project-aware://org/springframework/beans/factory/xml/spring-beans-4

例如:

Referenced file contains errors (project-aware://test-springmvc-2/org/springframework/beans/factory/xml/spring-beans-4.0.xsd). For more information, right click on the message in the Problems View and select "Show Details..."


引用文件包含错误, 在你的spring 的xml 文件中, 开头的中:

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring- beans-2.0.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.0.xsd
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-4.0.xsd">


你发现其中的 xsi:schemaLocation=

"http://www.springframework.org/schema/beanshttp://www.springframework.org/schema/beans/spring-beans-2.0.xsd"  引用的是 

spring-beans-2.0.xsd, 按错错误提示, 把其中的2.0 改为4.0就行了!


你可能感兴趣的:(java)