spring的xml配置文件出现故障

今天在断网的情况下,spring的applicationContext.xml文件开头部分出现红叉

<span style="font-size:18px;"><?

xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/<span style="color:#ff0000;">spring-beans.xsd</span>"></span>


出现故障的根本原因是找不到.xsd文件

找到spring-beans-4.0.5.RELEASE的jar文件。解压进去到spring-beans-4.0.5.RELEASEorgspringframeworkeansfactoryxml文件夹下

看果然没有这个.xsd文件

改动为

<span style="font-size:18px;"><?xml version="1.0" encoding="UTF-8"?

> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/<span style="color:#ff0000;">spring-beans4.0.xsd</span>"></span>


红叉就不见了,问题解决

原文地址:https://www.cnblogs.com/llguanli/p/6813716.html