eclipse中设置spring的applicationContext等配置文件的提示
在eclipse中如果使用比较新的spring或者hibernate的版本时,eclipse对spring的applicationContext.xml可能会提示不出来,这是因为每次进行提示时都需要到根据链接到网上去查询xsd文件引起的,只要在本地做个映射就可以解决这个问题。以下图为例说明:
默认情况下eclipse对于spring3.2.1不能提示,如果需要tx/mvc等的提示,需要如下操作:
Window -> Preferences -> MyEclipse -> Files and Editors -> XML -> XML Catalog,然后点击Add,出现下图:
点击”File System...”按钮,选择mvc的xsd,将key type设置为Schema location,
Key设置为:http://www.springframework.org/schema/mvc/spring-mvc-3.2.xsd,如下图所示:
然后点击“OK”即可,如果有其它依次按照上面的方式处理即可。
转载于:https://blog.51cto.com/4728326/1136435