12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 |
- <?xml version="1.0" encoding="UTF-8"?>
- <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5">
- <display-name>EMS_Weather</display-name>
- <!-- 加载Spring配置 -->
- <context-param>
- <param-name>contextConfigLocation</param-name>
- <param-value>classpath:config/spring/spring-base.xml</param-value>
- </context-param>
- <!-- 加载Log4j配置 -->
- <context-param>
- <param-name>log4jConfigLocation</param-name>
- <param-value>classpath:config/log4j/log4j.properties</param-value>
- </context-param>
- <!-- 启动Log4j -->
- <listener>
- <listener-class>org.springframework.web.util.Log4jConfigListener</listener-class>
- </listener>
- <!-- 启动Spring -->
- <listener>
- <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
- </listener>
-
- <!-- 系统初始化 -->
- <servlet>
- <servlet-name>SystemInitServlet</servlet-name>
- <servlet-class>com.persagy.init.SystemInitServlet</servlet-class>
- <load-on-startup>0</load-on-startup>
- </servlet>
- <!-- 解决乱码 -->
- <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>
-
- <!-- CORS过滤器start -->
- <filter>
- <filter-name>corsFilter</filter-name>
- <filter-class>com.persagy.filter.CorsFilter</filter-class>
- </filter>
- <filter-mapping>
- <filter-name>corsFilter</filter-name>
- <url-pattern>/*</url-pattern>
- </filter-mapping>
- <!-- CORS过滤器end -->
-
- <!-- Spring MVC -->
- <servlet>
- <servlet-name>SpringMVC</servlet-name>
- <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
- <init-param>
- <param-name>contextConfigLocation</param-name>
- <param-value>classpath:config/spring/spring-mvc.xml</param-value>
- </init-param>
- <load-on-startup>1</load-on-startup>
- </servlet>
- <servlet-mapping>
- <servlet-name>SpringMVC</servlet-name>
- <url-pattern>/Spring/MVC/*</url-pattern>
- </servlet-mapping>
- </web-app>
|