|
|
@@ -4,22 +4,6 @@
|
|
|
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
|
|
|
version="2.5">
|
|
|
|
|
|
- <!-- 强制进行转码 -->
|
|
|
- <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>
|
|
|
- <dispatcher>REQUEST</dispatcher>
|
|
|
- <dispatcher>FORWARD</dispatcher>
|
|
|
- </filter-mapping>
|
|
|
-
|
|
|
<!-- 默认的spring配置文件是在WEB-INF下的applicationContext.xml -->
|
|
|
<listener>
|
|
|
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
|
|
|
@@ -53,18 +37,18 @@
|
|
|
</servlet-mapping>
|
|
|
|
|
|
<!-- shiroFilter : DelegatingFilterProxy作用是自动到spring容器查找名字为shiroFilter(filter-name)的bean并把所有Filter的操作委托给它。然后将shiroFilter配置到spring容器即可 -->
|
|
|
- <filter>
|
|
|
- <filter-name>shiroFilter</filter-name>
|
|
|
- <filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
|
|
|
- <init-param>
|
|
|
- <param-name>targetFilterLifecycle</param-name>
|
|
|
- <param-value>true</param-value>
|
|
|
- </init-param>
|
|
|
- </filter>
|
|
|
- <filter-mapping>
|
|
|
- <filter-name>shiroFilter</filter-name>
|
|
|
- <url-pattern>/*</url-pattern>
|
|
|
- </filter-mapping>
|
|
|
+ <!--<filter>-->
|
|
|
+ <!--<filter-name>shiroFilter</filter-name>-->
|
|
|
+ <!--<filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>-->
|
|
|
+ <!--<init-param>-->
|
|
|
+ <!--<param-name>targetFilterLifecycle</param-name>-->
|
|
|
+ <!--<param-value>true</param-value>-->
|
|
|
+ <!--</init-param>-->
|
|
|
+ <!--</filter>-->
|
|
|
+ <!--<filter-mapping>-->
|
|
|
+ <!--<filter-name>shiroFilter</filter-name>-->
|
|
|
+ <!--<url-pattern>/*</url-pattern>-->
|
|
|
+ <!--</filter-mapping>-->
|
|
|
|
|
|
<!-- session配置 -->
|
|
|
<session-config>
|