javaweb项目中使用 apache.shiro 进行安全校验以及权限管理

shiro:协助管理身份认证和权限认证的安全框架

三大重要组件:subject,直接与用户交互,将用户的信息交给SecurityManager处理,SecurityManager根据realm中自定义的认证规则进行处理

1、导入依赖

org.apache.shiro shiro-spring 1.3.2 org.apache.shiro shiro-core 1.3.2 2、配置web.xml

shiroFilter org.springframework.web.filter.DelegatingFilterProxy targetFilterLifecycle true shiroFilter /* pinyougou org.springframework.web.servlet.DispatcherServlet contextConfigLocation classpath:springmvc.xml, classpath:applicationContext-shiro.xml 1 pinyougou / 3、配置

applicationContext-shiro.xml, Spring整合shiro

Shiro与Spring整合 /index.jsp* = anon /login.jsp* = anon /login* = anon /logout* = anon /css/** = anon /img/** = anon /plugins/** = anon /make/** = anon /** = authc

联系客服:779662525#qq.com(#替换为@) 苏ICP备20003344号-4