Allen32

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

文章分类 -  Shiro

摘要:public class CryptographyUtil { public static String encBase64(String str) { return Base64.encodeToString(str.getBytes()); } public static String decBase64(String str){... 阅读全文
posted @ 2018-02-08 20:28 Allen32 阅读(64) 评论(0) 推荐(0)

摘要:下面来讲解具体的标签用法。 1.guest(游客) 2.user(已经登录,或者记住我登录) 3.authenticated(已经认证,排除记住我登录的) 4.notAuthenticated(和authenticated相反) 这个功能主要用途,识别是不是本次操作登录过的,比如支付系统,进入系统可 阅读全文
posted @ 2018-02-08 20:24 Allen32 阅读(360) 评论(0) 推荐(0)

摘要:由于使用Shiro的注解用到了cglib 真是运行的方法并不是贴有注解的方法 ,而是其父类,所以会导致常规方法拿不到注解,参考网上的资料通过一下的方式可以获得注解,注意红字的部分 获取su //获取父类上的方法才有注解 Method[] methods = bean.getClass().getSu 阅读全文
posted @ 2018-02-01 09:04 Allen32 阅读(123) 评论(0) 推荐(0)

摘要:package realm; import cn.wolfcode.wms.domain.Employee; import cn.wolfcode.wms.mapper.EmployeeMapper; import cn.wolfcode.wms.mapper.PermissionMapper; import cn.wolfcode.wms.mapper.RoleMapper; import ... 阅读全文
posted @ 2018-01-31 14:17 Allen32 阅读(65) 评论(0) 推荐(0)

摘要:1.导入Pom依赖 设置拦截器:权限需要在访问链接之前,所以配置拦截器,Spring配置在Spring的字符拦截器的后面 shiroFilter是一个代理对象 需要在shiro.xml(Spring配置文件)中指定 shiro.xml 并指定一个bean 配置安全管理器 权限注解 凭证匹配器 阅读全文
posted @ 2018-01-31 13:24 Allen32 阅读(1090) 评论(0) 推荐(0)