Welcome 微信登录
编程资源 图片资源库 蚂蚁家优选 PDF转换器

首页 / 操作系统 / Linux / Spring中编写配置文件之帮助提示

先来看一个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.xsdmyeclipse会从网上下载该xsd,将该文件内容缓存在编写spring.xml出现提示有如下方法方法一 打开网络,让eclipse自行上网下载方法二手动添加schema文件
① 找到xmlcatalogwindows—>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