XML文件格式
来源:互联网 发布:linux安装telnet服务 编辑:程序博客网 时间:2024/05/17 01:56
通过spring的核心文件applicationContext.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" xmlns:p="http://www.springframework.org/schema/p"xmlns:context="http://www.springframework.org/schema/context"xmlns:task="http://www.springframework.org/schema/task"xmlns:aop="http://www.springframework.org/schema/aop"xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task-3.1.xsdhttp://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd"default-lazy-init="false"><!-- spring容器启动就会扫描依赖和注入关系,不引入会报错 --><context:component-scan base-package="com"><!-- <context:exclude-filter type="annotation" expression="org.springframework.stereotype.Controller" /> --></context:component-scan><import resource="classpath:spring/db.xml" /><import resource="classpath:spring/shiro.xml" /><context:property-placeholder location="classpath:spring/jdbc.properties" /><import resource="classpath:mybatis/mybatis.xml" /></beans>
version xml版本
encoding xml字符集
xmlns xml命名空间,定义xml文档标签的元素和属性,避免多个命名空间的冲突
xmlns: 表示默认的命名空间,默认的命名空间不需要前缀,例如:<bean id="xxx" class="xxx.xxx.xxx.Xxx">
xmlns:context="xxx" 表示带有前缀的命名空间,前缀context需要在文档中声明,例如:<context:component-scan base-package="xxx.xxx.controller" />
xsi:schemaLocation 为在xsi命名空间中定义的属性,其值格式成对出现,奇数值为命名空间,偶数值为命名空间schema所在位置
<!DOCTYPE 定义本xml文档解析器的dtd文件,dtd是xml文档定义类型,定义一种准确描述XML语言的方式,例如mybatis的Configuration.xml
<?xml version="1.0" encoding="UTF-8" ?><!DOCTYPE configuration PUBLIC "-//mybatis.org//DTD Config 3.0//EN""http://mybatis.org/dtd/mybatis-3-config.dtd"><configuration> <typeAliases> <typeAlias alias="User" type="com.metronic.domain.SysUser"/> </typeAliases> </configuration>
阅读全文
0 0
- XML文件格式
- XML文件格式
- xml文件格式
- XML文件格式
- XML文件格式
- XML文件格式
- xml文件格式如下
- xml 文件格式,以及dtd。。。
- xml文件格式如下
- xml文件格式如下
- VTK XML 文件格式
- XML文件格式简介
- Excel 2003的XML文件格式
- XML文件格式语法及DTD
- XML文件格式语法及DTD
- XML文件格式语法及DTD
- XML文件格式语法及DTD
- XML文件格式语法及DTD
- 菜鸟前端日记6 (原生JS--函数基础)
- STM32学习之:定时器简介
- 惊呆!谷歌AI自动编程效率超研发工程师,作为AI工程师的我感到了森森的压力
- 图的绝对中心(bzoj 2180: 最小直径生成树)
- JSON字符串和对象之间的相互转换
- XML文件格式
- 3、JQuery——DOM的插入
- 论文理解 Deep Residual Learning for Image Recognition
- Resin4和Tomcat8容器下部署Maven项目
- readonly 和 disable 的区别
- 关于ASP.NET和.NET的区别和联系 对于一个新手,往往会被这些名字给搞蒙了,对不起(笨小孩我也被搞蒙过,见笑啦),这归根结底还是怪自己对知识掌握和了解的不够,废话不多,直接到主题。 ASP.N
- Linux lvm cache的应用
- js == 与 === 的区别
- jQuery Miscellaneous