|
|
|
@ -7,12 +7,20 @@
|
|
|
|
|
|
|
|
|
|
<display-name>spring-oauth-server</display-name> |
|
|
|
|
|
|
|
|
|
<!-- |
|
|
|
|
distributable |
|
|
|
|
应用支持在分布式Web容器中部署 |
|
|
|
|
--> |
|
|
|
|
<distributable/> |
|
|
|
|
|
|
|
|
|
<context-param> |
|
|
|
|
<param-name>webAppRootKey</param-name> |
|
|
|
|
<param-value>spring-oauth-server</param-value> |
|
|
|
|
</context-param> |
|
|
|
|
|
|
|
|
|
<!-- |
|
|
|
|
字符编码Filter, 统一为UTF-8 |
|
|
|
|
--> |
|
|
|
|
<!--Encoding filter--> |
|
|
|
|
<filter> |
|
|
|
|
<filter-name>encodingFilter</filter-name> |
|
|
|
@ -31,6 +39,10 @@
|
|
|
|
|
<url-pattern>/*</url-pattern> |
|
|
|
|
</filter-mapping> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- |
|
|
|
|
响应时启用GZIP压缩, 提高性能与网络传输 |
|
|
|
|
--> |
|
|
|
|
<!--GzipFilter --> |
|
|
|
|
<filter> |
|
|
|
|
<filter-name>gzipFilter</filter-name> |
|
|
|
@ -68,6 +80,9 @@
|
|
|
|
|
</filter-mapping> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- |
|
|
|
|
Spring Security 拦截 Filter配置 |
|
|
|
|
--> |
|
|
|
|
<filter> |
|
|
|
|
<filter-name>springSecurityFilterChain</filter-name> |
|
|
|
|
<filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class> |
|
|
|
@ -78,6 +93,9 @@
|
|
|
|
|
<url-pattern>/*</url-pattern> |
|
|
|
|
</filter-mapping> |
|
|
|
|
|
|
|
|
|
<!-- |
|
|
|
|
Sitemesh, 装饰器Filter |
|
|
|
|
--> |
|
|
|
|
<!-- sitemesh filter--> |
|
|
|
|
<filter> |
|
|
|
|
<filter-name>sitemesh</filter-name> |
|
|
|
@ -93,6 +111,9 @@
|
|
|
|
|
<mime-type>image/vnd.microsoft.icon</mime-type> |
|
|
|
|
</mime-mapping> |
|
|
|
|
|
|
|
|
|
<!-- |
|
|
|
|
配置Spring Context 加载配置文件 |
|
|
|
|
--> |
|
|
|
|
<!--contextConfigLocation --> |
|
|
|
|
<context-param> |
|
|
|
|
<param-name>contextConfigLocation</param-name> |
|
|
|
@ -102,15 +123,26 @@
|
|
|
|
|
<param-name>log4jConfigLocation</param-name> |
|
|
|
|
<param-value>/WEB-INF/log4j.xml</param-value> |
|
|
|
|
</context-param> |
|
|
|
|
|
|
|
|
|
<!-- |
|
|
|
|
Log4j 日志监听器 |
|
|
|
|
--> |
|
|
|
|
<listener> |
|
|
|
|
<listener-class>org.springframework.web.util.Log4jConfigListener</listener-class> |
|
|
|
|
</listener> |
|
|
|
|
|
|
|
|
|
<!-- |
|
|
|
|
Spring Context 监听 |
|
|
|
|
--> |
|
|
|
|
<!-- Spring context listener --> |
|
|
|
|
<listener> |
|
|
|
|
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> |
|
|
|
|
</listener> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- |
|
|
|
|
Spring MVC 配置 |
|
|
|
|
--> |
|
|
|
|
<!--mvc--> |
|
|
|
|
<servlet> |
|
|
|
|
<servlet-name>mkk</servlet-name> |
|
|
|
@ -127,6 +159,9 @@
|
|
|
|
|
<!--<location>/index.jsp</location>--> |
|
|
|
|
<!--</error-page>--> |
|
|
|
|
|
|
|
|
|
<!-- |
|
|
|
|
配置Session 有效期时间 30分钟 |
|
|
|
|
--> |
|
|
|
|
<session-config> |
|
|
|
|
<session-timeout>30</session-timeout> |
|
|
|
|
</session-config> |
|
|
|
|