摘要:public class CryptographyUtil { public static String encBase64(String str) { return Base64.encodeToString(str.getBytes()); } public static String decBase64(String str){...
阅读全文
文章分类 - Shiro
摘要:public class CryptographyUtil { public static String encBase64(String str) { return Base64.encodeToString(str.getBytes()); } public static String decBase64(String str){...
阅读全文
摘要:下面来讲解具体的标签用法。 1.guest(游客) 2.user(已经登录,或者记住我登录) 3.authenticated(已经认证,排除记住我登录的) 4.notAuthenticated(和authenticated相反) 这个功能主要用途,识别是不是本次操作登录过的,比如支付系统,进入系统可
阅读全文
摘要:由于使用Shiro的注解用到了cglib 真是运行的方法并不是贴有注解的方法 ,而是其父类,所以会导致常规方法拿不到注解,参考网上的资料通过一下的方式可以获得注解,注意红字的部分 获取su //获取父类上的方法才有注解 Method[] methods = bean.getClass().getSu
阅读全文
摘要: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 ...
阅读全文
摘要:1.导入Pom依赖 设置拦截器:权限需要在访问链接之前,所以配置拦截器,Spring配置在Spring的字符拦截器的后面 shiroFilter是一个代理对象 需要在shiro.xml(Spring配置文件)中指定 shiro.xml 并指定一个bean 配置安全管理器 权限注解 凭证匹配器
阅读全文
|