Shiro
What Apache Shiro旨在成为最全面的,但也是最容易使用的Java安全框架。 文档 没有比官网更好的了 https://shiro.apache.org/get-started.html 简要分析 四大基石: 认证,授权,会话管理,加密 了解术语 Authentication:认证 Authorization:授权(访问控制) 其他:https://shiro.apache.org/terminology.html 架构 Shiro的架构有三个主要概念:Subject,SecurityManager和Realms 其他:https://shiro.apache.org/architecture.html 快速启动 获取当前用户(这里叫主题subject,代之用户,程序,上下文等,不叫user主要是防止shiro不跟其他框架重名) Subject currentUser = SecurityUtils.getSubject(); 获得会话session Session session = currentUser.getSession(); session.setAttribu...