问题记录之spring-mvc.xml配置文件报错

时间:2022-12-10 23:39:54

    问题记录之spring-mvc.xml配置文件报错

内容:Referenced file contains errors (http://www.springframework.org/schema/tx/spring-tx.xsd). For more   information, right click on the message in the Problems View and select "Show Details..."

原因分析:用eclipse内置浏览器无法打开配置的地址,用谷歌却可以打开,最后发现是代理的问题,不使用代理直接联网即可

1. 首先为了确保 Eclipse 可以从远程拿到 xsd 文件,到 Window -> Preferences -> General -> Network Connections -> Cache 下的 Cache entries 框内检查所需要的文件是否正确,如果不确定,就点击 "Remove All",然后右击当前的 Project 选择 Validator,Eclipse 会重新加载 xsd 文件;

                 问题记录之spring-mvc.xml配置文件报错

 

2. 最简捷的方法是修改 xsd 文件的版本号(这里已经删除了,但仍报错,故采取method 1)