手机版
你好,游客 登录 注册
背景:
阅读新闻

Spring中编写配置文件之帮助提示

[日期:2012-09-08] 来源:Linux社区  作者:woshixuye [字体:大 中 小]
先来看一个spring基本配置文件的文件头

<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">

起到提示作用的是http://www.springframework.org/schema/beans/spring-beans-2.5.xsd

myeclipse会从网上下载该xsd,将该文件内容缓存

在编写spring.xml出现提示有如下方法

方法一

打开网络,让eclipse自行上网下载

方法二

手动添加schema文件


① 找到xmlcatalog

windows—>preferences—>myeclipse—>files and editors—>xml—>xmlcatalog

②找到xds文件

点击add在出现的窗口中的Key Type中选择URI,在location中选择"File system",找到spring解压目录的dis/resource目录中选择spring-beans-2.5.xsd

③配置相关信息

将Key Type改为Schema location。Key改为http://www.springframework.org/schema/beans/spring-beans-2.5.xsd

linux
相关资讯       Spring 
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款