eclipse中配置Spring的xsi:schemaLocation

来源:互联网 发布:java反射获取私有变量 编辑:程序博客网 时间:2024/05/16 10:00

在无网络状态下,使用了spring的schema时,在xml文件中无法自动提示或者无法生效。

 

解决:在eclipse中设置:

打开 Windows-->preferences-XML-XML catalog

然后在右边的User specified Entries 中Add一项:

Location:xsd文件的位置(在下载的Spring文件夹中的schema文件夹)

KeyType:Schema Location

Key: http://www.springframework.org/schema/mvc/spring-mvc-4.3.xsd

配置完成后在无网络状态下测试是否成功!


当然,以上方法对于任何的schema的配置都有效。

0 0
原创粉丝点击