Spring Boot系列 安全框架Apache Shiro基本功能.doc

Spring Boot系列 安全框架Apache Shiro基本功能.doc

Spring Boot系列 安全框架Apache Shiro基本功能 Apache Shiro是Java的一个安全框架。目前,使用Apache Shiro的人越来越多,因为它相当简单,对比Spring Security,可能没有Spring Security做的功能强大,但是在实际工作时可能并不需要那么复杂的东西,所以使用小而简单的Shiro就足够了。 详细基础知识,请参考跟我学Shiro 的系列文章 这里只是给出Spring Boot 集成Shiro 的案例,Spring Boot就是为了简化传统Spring开发的复杂度,即去xml化,所以案例中也是没有xml配置,完全 javaconfig方式配置。 集成Shiro核心内容: ShiroFilterFactory,Shiro过滤器工程类,具体的实现类是:ShiroFilterFactoryBean,此实现类是依赖于SecurityManager安全管理器。主要配置Filter就好。 SecurityManager,Shiro的安全管理,主要是身份认证的管理,缓存管理,cookie管理,所以在实际开发中我们主要是和SecurityManager进行打交道的。 Realm,用于身份信息权限信息的验证。开发时集成AuthorizingRealm,重写两个方法:doGetAuthenticationInfo(获取即将需要认

文档评论(0)

1亿VIP精品文档

相关文档