一、解决书写spring的xml文件时没有小助手问题
<?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/spring-beans-2.5.xsd">
</beans>
当添加<bean>时,会有小助手提示,主要是因为计算机联网,eclipse自动下载spring-beans-2.5.xsd文件致缓存。假如计算机不联网,需要通过配置来解决没有小助手的问题。
windows——preferences——xml——xmlcatalog——User Specified Entries,单击add,选择 catalog entry,location属性填 spring-beans-2.5.xsd 的位置如:C:\spring-beans-2.5.xsd, key type属性选择 Schema location,key属性后面加上 spring-beans-2.5.xsd ,确定即可。
本文介绍了解决在不联网情况下使用Eclipse编辑Spring XML配置文件时缺少代码提示的问题。通过配置XML目录并指定xsd文件位置,实现离线环境下也能获得良好的编辑体验。
940

被折叠的 条评论
为什么被折叠?



