| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116 |
- <?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>ncjtEntranceGuard</display-name>
- <welcome-file-list>
- <welcome-file>index.html</welcome-file>
- <welcome-file>index.htm</welcome-file>
- <welcome-file>index.jsp</welcome-file>
- <welcome-file>default.html</welcome-file>
- <welcome-file>default.htm</welcome-file>
- <welcome-file>default.jsp</welcome-file>
- </welcome-file-list>
-
- <!-- log4j配置 4项 -->
- <context-param>
- <param-name>log4jConfigLocation</param-name>
- <param-value>classpath:log4j.properties</param-value>
- </context-param>
-
- <context-param>
- <param-name>log4jRefreshInterval</param-name>
- <param-value>60000</param-value>
- </context-param>
- <listener>
- <listener-class>
- org.springframework.web.util.Log4jConfigListener
- </listener-class>
- </listener>
-
- <!-- <listener> -->
- <!-- <listener-class> -->
- <!-- org.springframework.web.context.ContextLoaderListener -->
- <!-- </listener-class> -->
- <!-- </listener> -->
-
- <!-- 指定Spring配置文件的路径 -->
- <context-param>
- <param-name>contextConfigLocation</param-name>
- <param-value>classpath:spring/spring_*.xml</param-value>
- </context-param>
- <!-- 在监听器中启用Spring -->
- <listener>
- <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
- </listener>
- <!-- 随容器启动SpringMVC的前端控制器 -->
- <servlet>
- <servlet-name>springDispatcherServlet</servlet-name>
- <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
- <init-param>
- <param-name>contextConfigLocation</param-name>
- <param-value>classpath:springmvc/springmvc.xml</param-value>
- </init-param>
- <load-on-startup>1</load-on-startup>
- </servlet>
- <!-- 配置由SpringMVC映射的请求链接 -->
- <!-- /表示所有的请求链接都由SpringMVC处理 -->
- <servlet-mapping>
- <servlet-name>springDispatcherServlet</servlet-name>
- <url-pattern>/</url-pattern>
- </servlet-mapping>
- <!-- 配置编码过滤器 -->
- <!-- 解决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>
- <!-- 全局鉴权过滤器:默认拦截所有请求,仅放行白名单(见 Manage_map)。
- 如需临时额外放行若干路径,取消下面 init-param 的注释并填写,
- 多个用逗号分隔,以 * 结尾表示前缀匹配,例:/getSchoolMapAndWeichat,/test* -->
- <filter>
- <filter-name>token</filter-name>
- <filter-class>com.ncjt.ch.sm.filter.TokenFilter</filter-class>
- <!--
- <init-param>
- <param-name>excludedPaths</param-name>
- <param-value></param-value>
- </init-param>
- -->
- </filter>
- <filter-mapping>
- <filter-name>token</filter-name>
- <url-pattern>/*</url-pattern>
- </filter-mapping>
- <!-- JNDI lookup for name抛出异常问题 -->
- <context-param>
- <param-name>spring.profiles.active</param-name>
- <param-value>dev</param-value>
- </context-param>
- <context-param>
- <param-name>spring.profiles.default</param-name>
- <param-value>dev</param-value>
- </context-param>
- <context-param>
- <param-name>spring.liveBeansView.mbeanDomain</param-name>
- <param-value>dev</param-value>
- </context-param>
-
- </web-app>
|