web+spring的使用

<!--配置文件加入了shiro的配置内容-->
<context-param>
		<param-name>contextConfigLocation</param-name>
		<param-value>classpath:com/zhuyu/resource/spring/application/applicationContext.xml
		classpath:com/zhuyu/resource/spring/shiro/shiro-context.xml
		</param-value>
	</context-param>


<filter>
		<filter-name>shiroFilter</filter-name>
		<filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
<!--该参数默认是false,表示由过滤器自己管理生命周期,该filter调用init方法时自己初始化,自己销毁等。如果需要由类似spring等框架来管理生命周期,则设置为true-->		<init-param>
			<param-name>targetFilterLifecycle</param-name>
			<param-value>true</param-value>
		</init-param>
	</filter>


<filter-mapping>
		<filter-name>shiroFilter</filter-name>
		<url-pattern>/roseadmin/rms/*</url-pattern>
		<url-pattern>*.jhtml</url-pattern>
		<url-pattern>*.html</url-pattern>
		<url-pattern>*.htm</url-pattern>
	</filter-mapping>


猜你喜欢

转载自liyixing1.iteye.com/blog/2328256
今日推荐