<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:aop="http://www.springframework.org/schema/aop" xmlns:util="http://www.springframework.org/schema/util"
xmlns:cache="http://www.springframework.org/schema/cache"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
http://www.springframework.org/schema/util
http://www.springframework.org/schema/util/spring-util-3.0.xsd
http://www.springframework.org/schema/cache
http://www.springframework.org/schema/cache/spring-cache.xsd
">
<!-- ehcache 的配置 -->
<bean id="cacheManager"
class="org.springframework.cache.ehcache.EhCacheManagerFactoryBean">
<property name="configLocation">
<value>classpath:ehcache.xml</value>
</property>
</bean>
<bean id="shiroCacheManager" class="org.apache.shiro.cache.ehcache.EhCacheManager">
<property name="cacheManager" ref="cacheManager"/>
</bean>
<!-- shiro的配置 -->
<bean id="myShiroRealm" class="com.btlh.shiro.MyShiroRealm">
<!-- 用来实现用户名密码的查询 -->
<property name="sysUserService" ref="sysUserService"></property>
<property name="authenticationCacheName" value="shiroAuthorizationCache"></property>
</bean>
<bean id="securityManager" class="org.apache.shiro.web.mgt.DefaultWebSecurityManager">
<property name="cacheManager" ref="shiroCacheManager" />
<property name="realm" ref="myShiroRealm" />
<property name="sessionManager" ref="sessionManager" />
</bean>
<bean id="shiroSessionDao" class="org.apache.shiro.session.mgt.eis.EnterpriseCacheSessionDAO" />
<bean id="sessionManager"
class="org.apache.shiro.web.session.mgt.DefaultWebSessionManager">
<!-- 超时时间 -->
<property name="globalSessionTimeout" value="3600000" />
<!-- session存储的实现 -->
<property name="sessionDAO" ref="shiroSessionDao" />
<!-- 定时检查失效的session -->
<property name="sessionValidationSchedulerEnabled" value="true" />
</bean>
<bean id="lifecycleBeanPostProcessor" class="org.apache.shiro.spring.LifecycleBeanPostProcessor" />
<bean id="formAuthenticationFilter"
class="org.apache.shiro.web.filter.authc.FormAuthenticationFilter" />
<bean id="shiroFilter" class="org.apache.shiro.spring.web.ShiroFilterFactoryBean">
<property name="securityManager" ref="securityManager" />
<property name="loginUrl" value="/login.jsp" />
<property name="successUrl" value="/index.jsp" />
<property name="unauthorizedUrl" value="/error.jsp" />
<property name="filters">
<util:map>
<entry key="authc" value-ref="formAuthenticationFilter" />
</util:map>
</property>
<property name="filterChainDefinitions">
<value>
/Kaptcha.jpg = anon
/scripts/** = anon
/#section-bar-1 = anon
/#section-bar-2 = anon
/fonts/** = anon
/style/** = anon
/images/** anon
/login.jsp = anon
/sys/login.action = anon
/** = authc
</value>
</property>
</bean>
</beans>
分享到:
相关推荐
项目简介:此项目只是简单的集成spring+springmvc+shiro+ehcahce 二: 步骤说明: 1:项目集成spring 在web.xml中配置spring容器的监听器。 2:项目集成springmvc 在web.xml中配置前端控制器 3:项目集成...
在上家公司自己集成的一套系统,用了两个多月的时间完成的:Springboot+Mybatis-plus+ SpringMvc+Shiro+Redis企业级开发系统 Springboot作为容器,使用mybatis作为持久层框架 使用官方推荐的thymeleaf做为模板引擎...
由于项目需要从网上搜集的相关的集成框架,很多都是部分集成,一直没有找到整个流程全部集成好的,所以将集成好的框架分享出来供大家学习。 主要实现SSO、后台RBAC角色认证管理。 下载后需要自行修改配置,项目包内...
shiro作为安全框架,主流技术 几乎零XML,极简配置 两套UI实现(bootstrap+layer ui),可以自由切换 报表后端采用技术: SpringBoot整合SSM(Spring+Mybatis-plus+ SpringMvc),spring security 全注解式的权限管理和...
1、主工程 BZQ-4Spring-B2B2C 工程是通过MAVEN构建,IDE是SPRINGTOOLS4,jdk1.8 商品中心模型工程 BZQ-B2B2C-WARE 包括 BZQ-B2B2C-WARE-CENTER 和 BZQ-B2B2C-WARE-API ... 有MVC配置,持久层配置,初步权限集成
shiro作为安全框架,主流技术 几乎零XML,极简配置 两套UI实现(bootstrap+layer ui),可以自由切换 报表后端采用技术: SpringBoot整合SSM(Spring+Mybatis-plus+ SpringMvc),spring security 全注解式的权限管理和...
适用于spring集成的javaweb环境
和博客的内容相辅相成。这个版本是开箱即用的,简单的配置下自己的host就ok
shiro集成spring开发,可以学习怎么配置shiro和spring集成等等
springboot集成mybatis+shiro+thymeleaf。只是个人做的小demo,@SpringBootApplication 和@RestController是一个组合注解。@RestController是组合了@ResponseBody&@Controller 注解分为元注解和组合注解。 注解又分为...
一个集成了SSM(Spring+Spring MVC+MyBatis)和Shiro的博客系统是一个很好的毕业设计项目选择。下面是一个可能的项目结构和功能点: 搭建开发环境:配置Java开发环境,安装相应的IDE(如IntelliJ IDEA、Eclipse),...
spring、springmvc、shiro集成空框架,包括jar包、配置文件。
搭的一个ssm框架,连接的是mysql,把doc里面的sql执行后可以直接运行。项目里面配置了easyui,weiservice,websocket,shiro验证,拦截器,定时器等等(用户名:admin或1,密码:admin或1)
springMvc4.3+spring4.3+mybatis3.4+shiro1.4+log4j2+freemarker2.3+shiro-redis2.9
shiro+spring mvc结合的实例源码,包含类库,简单易懂,配置齐全
spring集成shiro 和mongodb数据库 ,下载可用ini配置,启用mongo配置
spring-boot集成shiro基本框架,下载之后修改配置:application.properties
Apache Shiro和Spring-Security为权限授权层,redis进行缓存。 Geek-Framework主要定位于微应用的开发,已内置后台系统的基础功能,用户管理、角色管理、权限管理、会员管理、日志管理等;前台已经实现用户登录,...
快速开发:SpringBoot通过自动配置和约定大于配置的原则,大大简化了项目设置和开发过程。 易于扩展:SpringBoot与生俱来的灵活性使您可以轻松集成各种服务和数据库,以满足您日益增长的需求。 安全性:内置的安全...