xml ----> 几个常用dtd头文件模板

环境:

idea ce 2018.1

"File --> settings... --> Editor --> file and code templates"

spring

applicationContext-*.xml

 1 <?xml version="1.0" encoding="utf-8"?>
 2 <beans xmlns="http://www.springframework.org/schema/beans"
 3 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 4 xmlns:context="http://www.springframework.org/schema/context"
 5 xmlns:aop="http://www.springframework.org/schema/aop"
 6 xmlns:tx="http://www.springframework.org/schema/tx"
 7 xsi:schemaLocation="http://www.springframework.org/schema/beans
 8         http://www.springframework.org/schema/beans/spring-beans.xsd
 9         http://www.springframework.org/schema/context
10         http://www.springframework.org/schema/context/spring-context.xsd
11         http://www.springframework.org/schema/aop
12         http://www.springframework.org/schema/aop/spring-aop.xsd
13         http://www.springframework.org/schema/tx
14         http://www.springframework.org/schema/tx/spring-tx.xsd">
15 
16 </beans>

Web

web.xml

1 <?xml version="1.0" encoding="UTF-8"?>
2 <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
3 xmlns="http://java.sun.com/xml/ns/javaee" 
4 xsi:schemaLocation="http://java.sun.com/xml/ns/javaee 
5 http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
6 id="WebApp_ID" version="3.0">
7 </web-app>

jsp

xxx.jsp

 1 <%@ page language="java" contentType="text/html; charset=UTF-8"
 2     pageEncoding="UTF-8"%>
 3 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
 4 <html>
 5 <head>
 6 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
 7 <title>Hello World!</title>
 8 </head>
 9 <body>
10 Hello!
11 </body>
12 </html>

mybatis

xxxMapper.xml

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

猜你喜欢

转载自www.cnblogs.com/mrray1105/p/9121753.html