先看这个xml文件
这个xml没有设置任何的bean。先解释一下:
xmlns 是xml namespace,使用beans也就是IOC就需要引入这个命名空间 http://www.springframework.org/schema/beans。
xsi最后指向了一个网络上的位置
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
xml的代码提示就是从这个xsd上读取的。那么我们要把这个读取放到本地,代码提示功能会快一些。
Preference-xml-xml catalog在user specified entities上点add按钮
[img]http://dl2.iteye.com/upload/attachment/0100/5498/a507a96b-d094-310c-a663-d59cdf191570.png[/img]
1、location选file system 选中spring文件夹中的spring-beans-2.5.xsd文件
2、key type选Schema location
3、key填写http://www.springframework.org/schema/beans/spring-beans-2.5.xsd保持跟xml中一致。
4、点ok
[img]http://dl2.iteye.com/upload/attachment/0100/5500/96667904-b7f1-39b2-9097-4ea6535491df.png[/img]
这样xml代码提示的时候会跳转到本地磁盘上的xsd文件。比网络快多了,也爽多了
先看这个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>
这个xml没有设置任何的bean。先解释一下:
xmlns 是xml namespace,使用beans也就是IOC就需要引入这个命名空间 http://www.springframework.org/schema/beans。
xsi最后指向了一个网络上的位置
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
xml的代码提示就是从这个xsd上读取的。那么我们要把这个读取放到本地,代码提示功能会快一些。
Preference-xml-xml catalog在user specified entities上点add按钮
[img]http://dl2.iteye.com/upload/attachment/0100/5498/a507a96b-d094-310c-a663-d59cdf191570.png[/img]
1、location选file system 选中spring文件夹中的spring-beans-2.5.xsd文件
2、key type选Schema location
3、key填写http://www.springframework.org/schema/beans/spring-beans-2.5.xsd保持跟xml中一致。
4、点ok
[img]http://dl2.iteye.com/upload/attachment/0100/5500/96667904-b7f1-39b2-9097-4ea6535491df.png[/img]
这样xml代码提示的时候会跳转到本地磁盘上的xsd文件。比网络快多了,也爽多了