Shiro简介与入门
Shiro简介与入门 Apache Shiro是一个强大且易用的Java安全框架,有身份验证、授权、密码学和会话管理。使用Shiro的易于理解的API,您可以快速、轻松地获得任何应用程序,从最小的移动应用程序到最大的网络和企业应用程序。 Spring security 重量级安全框架 Apache Shiro轻量级安全框架 i. 导入jar org.apache.shiro shiro-core 1.4.0 commons-logging commons-logging 1.2 junit junit 4.12 ii. 准备资源 资源我们可以到shiro的源码文件中拷备: /shiro-root-1.4.0-RC2/samples/quickstart/src/main/resources shiro.ini log4j.properties 注:users下面代表的登录的用户(用户名=密码) shiro.ini文件(对拷备过来的数据进行了解释): # -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- - 所有的用户与对应的用户密码 ,用户的角色 -- -- -- -- -- -- -- -- -- --