常用的xml格式

来源:互联网 发布:中国化妆品数据网 编辑:程序博客网 时间:2024/05/16 10:42

1)applicationContext.xml(spring)

<?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:tx="http://www.springframework.org/schema/tx" xmlns:context="http://www.springframework.org/schema/context"    xmlns:aop="http://www.springframework.org/schema/aop"    xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.1.xsd        http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.1.xsd        http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.1.xsd        http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-4.1.xsd"></beans>

2)mybatis的基础配置文件(mybatisconfig.xml)

<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE configuration PUBLIC "-//iBATIS.com//DTD SQL Map Config 3.0//EN" "mybatis-3-config.dtd" ><configuration></configuration>

3)mybatis的mapper文件(mapper.xml)

<?xml version="1.0" encoding="UTF-8" ?>   <!DOCTYPE mapper       PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"       "http://mybatis.org/dtd/mybatis-3-mapper.dtd"><mapper namespace="domain.blog.mappers.AuthorMapper"></mapper>  

4)web.xml

<?xml version="1.0" encoding="UTF-8"?><web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"    xmlns="http://xmlns.jcp.org/xml/ns/javaee"    xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"    id="WebApp_ID" version="3.1">    <display-name>ssm-crud</display-name></web-app>
原创粉丝点击