<?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>master</display-name>
	<welcome-file-list>
		<welcome-file>index.html</welcome-file>
	</welcome-file-list>

	<!-- 加载spring容器 -->
	<context-param>
		<param-name>contextConfigLocation</param-name>
		<param-value>classpath:spring/applicationContext-*.xml</param-value>
	</context-param>
	<listener>
		<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
	</listener>

	<!-- 解决post乱码 -->
	<filter>
		<filter-name>CharacterEncodingFilter</filter-name>
		<filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
		<init-param>
			<param-name>encoding</param-name>
			<param-value>utf-8</param-value>
		</init-param>
	</filter>
	<filter-mapping>
		<filter-name>CharacterEncodingFilter</filter-name>
		<url-pattern>/*</url-pattern>
	</filter-mapping>

	<!-- springMvc客户端端配置 -->
	<servlet>
		<servlet-name>customer</servlet-name>
		<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
		<init-param>
			<param-name>contextConfigLocation</param-name>
			<param-value>classpath:spring/spring-mvc.xml</param-value>
		</init-param>
	</servlet>
	<servlet-mapping>
		<servlet-name>customer</servlet-name>
		<url-pattern>*.shtml</url-pattern>
	</servlet-mapping>

	<!--&lt;!&ndash;log4j配置&ndash;&gt;-->
	 <!--&lt;!&ndash;加载log4j的配置文件log4j.properties &ndash;&gt;-->
	<!--<context-param>-->
		<!--<param-name>log4jConfigLocation</param-name>-->
		<!--<param-value>classpath:log4j.properties</param-value>-->
	<!--</context-param>-->

	<!--&lt;!&ndash; 设定刷新日志配置文件的时间间隔，这里设置为10s &ndash;&gt;-->
	<!--<context-param>-->
		<!--<param-name>log4jRefreshInterval</param-name>-->
		<!--<param-value>10000</param-value>-->
	<!--</context-param>-->

	<!--&lt;!&ndash; 加载Spring框架中的log4j监听器Log4jConfigListener &ndash;&gt;-->
	<!--<listener>-->
		<!--<listener-class>org.springframework.web.util.Log4jConfigListener</listener-class>-->
	<!--</listener>-->

	<!-- 为避免项目间冲突，定义唯一的 webAppRootKey -->
	<context-param>
		<param-name>webAppRootKey</param-name>
		<param-value>km</param-value>
	</context-param>
</web-app>