[Spring] Spring配置文件头部xmlns配置
2017-09-06 12:56
489 查看
刚开始学习Spring或许都对其配置文件头部的各种配置表示困惑,先贴出一个比较常见的头部文件
对于使用spring的朋友,对这些应该再熟悉不过了,使用spring1年多了,今天偶尔间总算知道这些配置文件是干什么的了,spring2.0以前的版本是基于dtd的配置方式,之后的版本开始支持schema的配置,dtd的配置当bean属性太多或者复杂的时候,就会显得臃肿,这时就可以采用schema来精简一下了。
要使用schema就要引入相关的schema了,而上述的头部配置,观察下相应大家应该明白都引入了什么了,分别是aop tx context的引入,没错,头部这么一大串其实就是引入要使用的schema配置 文件。
本文转载自文章。
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:aop="http://www.springframework.org/schema/aop" xmlns:tx="http://www.springframework.org/schema/tx" xmlns:context="http://www.springframework.org/schema/context" xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd http://www.springframework.org/schema/context <a href="http://www.springframework.org/schema/context/spring-context-3.0.xsd">http://www.springframework.org/schema/context/spring-context-3.0.xsd</a>" >
对于使用spring的朋友,对这些应该再熟悉不过了,使用spring1年多了,今天偶尔间总算知道这些配置文件是干什么的了,spring2.0以前的版本是基于dtd的配置方式,之后的版本开始支持schema的配置,dtd的配置当bean属性太多或者复杂的时候,就会显得臃肿,这时就可以采用schema来精简一下了。
要使用schema就要引入相关的schema了,而上述的头部配置,观察下相应大家应该明白都引入了什么了,分别是aop tx context的引入,没错,头部这么一大串其实就是引入要使用的schema配置 文件。
本文转载自文章。
相关文章推荐
- spring配置文件头部xmlns配置解说
- spring配置文件头部xmlns配置解说
- 理解spring配置文件的头部信息(xmlns,xsi)
- spring配置文件头部xmlns配置 详细解释
- Spring 配置XML文件头部文件格式
- Spring配置文件头部
- Spring 配置XML文件头部文件格式
- Spring配置文件(xml)中的xmlns解析
- Spring配置文件的applicationContext.xml文件头部出现红叉
- spring 配置文件的头部 xmls
- Spring配置文件beans.xml头部配置解释
- spring配置文件头部配置解析
- spring配置文件头部配置解析
- Spring配置文件的头部的一些解释
- spring 配置文件的 完整xmlns
- Spring 配置文件头部xmls解析
- Spring 配置文件XML头部文件模板实例详解
- 【spring】spring配置文件命名空间(如:xmlns:beans="http://www.springframework.org/schema/beans")
- spring配置文件头部配置解析(applicationContext.xml)
- Spring配置文件XML头部文件模板