springmvc + shiro 配置(二、其他配置文件)
来源:互联网 发布:,知其雄守其雌! 编辑:程序博客网 时间:2024/06/05 21:04
sqlMap.xml
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE sqlMapConfig PUBLIC "-//iBATIS.com//DTD SQL Map Config 2.0//EN" "http://www.ibatis.com/dtd/sql-map-config-2.dtd"><sqlMapConfig> <settings cacheModelsEnabled="true" enhancementEnabled="true" lazyLoadingEnabled="true" errorTracingEnabled="true" maxRequests="32" maxSessions="10" maxTransactions="5" useStatementNamespaces="true" /> <sqlMap resource="sqlMap/*.xml"/></sqlMapConfig>
ehcache-shiro.xml
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE xml><ehcache updateCheck="false" name="shiroCache"> <!-- http://ehcache.org/ehcache.xml --> <defaultCache maxElementsInMemory="10000" eternal="false" timeToIdleSeconds="120" timeToLiveSeconds="120" overflowToDisk="false" diskPersistent="false" diskExpiryThreadIntervalSeconds="120" /></ehcache>
好了至此 配置文件基本结束。最后加一个web.xml的配置:
web.xml
<?xml version="1.0" encoding="UTF-8"?><web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" version="3.0"> <context-param> <param-name>contextConfigLocation</param-name> <param-value> classpath*:/applicationContext.xml, classpath*:/application-security-shiro.xml </param-value> </context-param> <context-param> <param-name>spring.profiles.default</param-name> <param-value>production</param-value> </context-param> <context-param> <param-name>log4jConfigLocation</param-name> <param-value>/WEB-INF/classes/log4j.properties</param-value> </context-param> <listener> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> </listener> <listener> <listener-class>org.springframework.web.util.Log4jConfigListener</listener-class> </listener> <context-param> <param-name>webAppRootKey</param-name> <param-value>server.root</param-value> </context-param> <filter> <filter-name>encodingFilter</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> <init-param> <param-name>forceEncoding</param-name> <param-value>true</param-value> </init-param> </filter> <filter-mapping> <filter-name>encodingFilter</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> <servlet> <servlet-name>manager</servlet-name> <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class> <init-param> <param-name>contextConfigLocation</param-name> <param-value>classpath*:manager-servlet.xml</param-value> </init-param> <load-on-startup>2</load-on-startup> </servlet> <servlet-mapping> <servlet-name>manager</servlet-name> <url-pattern>/</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>default</servlet-name> <url-pattern>/resources/upload/**</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>default</servlet-name> <url-pattern>*.html</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>default</servlet-name> <url-pattern>*.swf</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>default</servlet-name> <url-pattern>*.css</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>default</servlet-name> <url-pattern>*.gif</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>default</servlet-name> <url-pattern>*.jpg</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>default</servlet-name> <url-pattern>*.js</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>default</servlet-name> <url-pattern>*.png</url-pattern> </servlet-mapping> <welcome-file-list> <welcome-file>/admin/login</welcome-file> <welcome-file>index.jsp</welcome-file> </welcome-file-list> <error-page> <error-code>404</error-code> <location>/err/404</location> </error-page></web-app>
0 0
- springmvc + shiro 配置(二、其他配置文件)
- springmvc + shiro 配置(一、结构及配置文件)
- ssm配置文件(二)—springmvc.xml的配置
- SpringMVC+Shiro整合配置文件详解
- SpringMVC+Shiro整合配置文件详解
- sping+springmvc+mybatis+shiro,配置文件
- SpringMVC+Shiro整合配置文件详解
- springmvc+shiro简单配置及作用(shiro部分)
- spring+springmvc+shiro配置
- SpringMVC+Shiro配置
- SpringMvc(二)配置SpringMvc
- Apache shiro集群实现 (二) shiro 的INI配置
- Apache shiro集群实现 (二) shiro 的INI配置
- Apache shiro集群实现 (二) shiro 的INI配置
- springMVC中快速配置shiro
- shiro结合springMVC配置相关
- SpringMVC学习笔记(二)-----配置文件
- SpringMVC(二)配置文件
- openstack liberty版网络分析(1),基础网络的架构
- 1003. 我要通过!(20)
- UITextField去除用户SB而输入空格,和设置智能输入数字的方法
- LaTeX新人教程,30分钟从完全陌生到基本入门
- 抄袭、借鉴与创新,有什么区别?
- springmvc + shiro 配置(二、其他配置文件)
- [LeetCode-232] Implement Queue using Stacks(两个栈实现一个队列)
- 未来蓝牙将会分为三种:。Bluetooth Smart Ready、Bluetooth Smart、以及标准 Bluetooth
- 紫金桥软件与上润仪表通讯的调试
- centos mysql 基本操作
- OpenStack日志管理&配置管理安全性分析
- matlab中bwareaopen函数详细介绍及应用
- Activiti 5.18 mysql配置
- 快速高效学习Java编程在线资源Top 20