ApplicationContext.xml导入约束的一种方法
2017-11-25 11:23
351 查看
在之前的
Spring 框架环境配置 篇写过一次在 ApplicationContext.xml 导入约束的一种方法,不过那种方法是要预先
在那个预览库里导入了相关的约束文件才行,导入方法我暂时忘了
那么就在这里介绍一种不用预先导入相关约束的方法,这个方法我也是在网上发现的,觉得挺实用的,就拿小本本记下来了,仅供参考!
以导入 context 约束为例
1)在自己导入的 jar 包里找到 context 的 jar 包,类似
2)在这个 jar 包里找到 .context.config ,打开
3)打开相应版本的 .xsd ,双击打开这个文件
4)找到 xmlns 对应的地址,并把这个地址复制的 applicationContext.xml 对应的位置
5)继续在 1)的 jar 包里打开 META-INF,找到其中的 spring.schemas 文件,双击打开
6)在这个文件找到对应版本的 context.xsd,我这里是 spring-context-3.1.xsd,把这个地址也复制的 applicationContext.xml 相应的位置
恭喜,该约束配置完成
参考步骤
Spring 框架环境配置 篇写过一次在 ApplicationContext.xml 导入约束的一种方法,不过那种方法是要预先
在那个预览库里导入了相关的约束文件才行,导入方法我暂时忘了
那么就在这里介绍一种不用预先导入相关约束的方法,这个方法我也是在网上发现的,觉得挺实用的,就拿小本本记下来了,仅供参考!
以导入 context 约束为例
1)在自己导入的 jar 包里找到 context 的 jar 包,类似
2)在这个 jar 包里找到 .context.config ,打开
3)打开相应版本的 .xsd ,双击打开这个文件
4)找到 xmlns 对应的地址,并把这个地址复制的 applicationContext.xml 对应的位置
5)继续在 1)的 jar 包里打开 META-INF,找到其中的 spring.schemas 文件,双击打开
6)在这个文件找到对应版本的 context.xsd,我这里是 spring-context-3.1.xsd,把这个地址也复制的 applicationContext.xml 相应的位置
恭喜,该约束配置完成
参考步骤
相关文章推荐
- applicationcontext.xml里面导入别的xml的方法<import resource="/bean.xml"/>(一)
- Spring applicationContext.xml最全约束
- javaEE applicationContext.xml 放到WEB-INF下 class获得bean方法
- [学习笔记]在struts2.0框架中,多struts.xml与多applicationContext.xml配置的方法
- myeclipse 导入项目后找不到ApplicationContext.xml
- Could not open ServletContext resource [/WEB-INF/applicationContext.xml]解决方法
- 加载/WEB-INF/applicationContext.xml的解决方法
- Could not open ServletContext resource [/WEB-INF/applicationContext.xml]解决方法
- spring 找不到applicationContext.xml解决方法
- Could not open ServletContext resource [/WEB-INF/applicationContext.xml]解决方法
- applicationContext.xml 配置的两种方法
- 在struts2.0框架中,多struts.xml与多applicationContext.xml配置的方法
- spring mybatis 框架集成之applicationContext.xml配置方法
- Could not open ServletContext resource [/WEB-INF/applicationContext.xml]解决方法
- 向applicationContext.xml中导入jdbc文件
- java中读取配置文件的方法fileSystemXmlapplicationContext与classPathXmlApplicationContext
- spring读取applicationContext.xml获得BeanFactory的方法
- 最全的spring的xml文件约束applicationContext.xml
- Could not open ServletContext resource [/WEB-INF/applicationContext.xml]解决方法
- spring配置文件applicationContext.xml不能提示的解决方法