当前位置: 首页 > news >正文

超链接到网站怎么做视频网页ui设计是什么

超链接到网站怎么做视频,网页ui设计是什么,做班级网站的目的,找人做一下网站大概多少钱一些权限方面的思考 背景说明自定义注解解析自定义注解 背景 鉴权可以通过切面做抽取 说明 都是一些伪代码, 不能直接使用, 提供一种思路. 都是一些伪代码, 不能直接使用, 提供一种思路. 都是一些伪代码, 不能直接使用, 提供一种思路. 自定义注解 自定义注解: Permission … 一些权限方面的思考 背景说明自定义注解解析自定义注解 背景 鉴权可以通过切面做抽取 说明 都是一些伪代码, 不能直接使用, 提供一种思路. 都是一些伪代码, 不能直接使用, 提供一种思路. 都是一些伪代码, 不能直接使用, 提供一种思路. 自定义注解 自定义注解: Permission Documented Inherited Retention(RetentionPolicy.RUNTIME) Target({ElementType.TYPE, ElementType.METHOD}) public interface Permission {Member.Role [] roles();Type type();enum Type {/*** 项目类型*/PROJECT,/*** 团队类型*/TEAM,/*** 系统管理类型*/SYSTEM}class Member {enum Role {/*** 角色001*/ROLE_001,/*** 角色002*/ROLE_002}} }解析自定义注解 伪代码实现: PermissionAspect Aspect Component // DependsOn({springContextUtil}) Order(2) Slf4j public class PermissionAspect {Pointcut(annotation(Permission))private void annotationPointCut() {}Around(annotationPointCut())public Object before(ProceedingJoinPoint joinPoint) throws Throwable {RequestAttributes requestAttributes RequestContextHolder.getRequestAttributes();if (!(requestAttributes instanceof ServletRequestAttributes)) {throw new ClassCastException();}ServletRequestAttributes attributes (ServletRequestAttributes) requestAttributes;HttpServletRequest request attributes.getRequest();Signature signature joinPoint.getSignature();if (!(signature instanceof MethodSignature)) {throw new ClassCastException();}MethodSignature methodSignature (MethodSignature) signature;Method method methodSignature.getMethod();// 获取当前访问人信息UserContext.UserInfo userInfo UserContext.getInstance().getCurrentUser();if (userInfo null) {throw new Exception();}// 如实是SuperAdmin直接放行// TODOPermission annotation method.getAnnotation(Permission.class);// 方法配置的角色Permission.Member.Role[] roles annotation.roles();// 方法指定的类型Permission.Type type annotation.type();// 核心校验逻辑permissionCheck(request, roles, type, userInfo);return joinPoint.proceed();}/*** 人员角色鉴权** param request 请求* param permittedRoles 配置的授权角色数组* param type 配置的类型* param userInfo 当前用户信息*/private void permissionCheck(HttpServletRequest request, Permission.Member.Role[] permittedRoles, Permission.Type type, UserContext.UserInfo userInfo) throws Exception {boolean hasPermission false;// TODO 只需要校验 // ListRole roleList xxx.getMemberRole(uuid, spaceId); // hasPermission CollectionUtil.containsAny(currentMemberRoles, Arrays.asList(permittedRoles)); // if (!hasPermission) { // // 没有权限 // throw new Exception(); // }}/*** // TODO 伪代码: 模拟用户上下文*/Datastatic class UserContext {UserInfo currentUser;private UserContext(){}public static UserContext getInstance() {return null;}class UserInfo {}} }
http://www.pierceye.com/news/966111/

相关文章:

  • 四川德行天下建设工程有限公司网站ie兼容所有网站
  • 网站seo诊断免费php源码网
  • 微信公众号商城网站开发湖南省新闻最新消息十条
  • 如何做网站家具导购做哈尔滨本地门户网站赚钱吗
  • 建立网站的步骤有哪些wordpress 主题
  • 网站功能建设中页面个体户做网站有用吗
  • 网站建设具体要求wordpress启用注册
  • 重庆好的网站建设公司车辆管理网站开发
  • 十大SEO网站外链建设误区城乡住房建设部网站保证金
  • 自己做一元夺宝网站dede 管理多个网站
  • 做app还是做微网站好聚美网站开发开题报告
  • 网站建设总结与科技网站建设+长沙
  • 网博士自助建站系统手机wap网站程序
  • 做网站有什么不好竞价广告
  • 个人网站 cms企业做网站的好处有哪些
  • 公司做网站的费用入账国内电商平台网站制作排行榜
  • 做网站电脑开一天用多少钱怎么做网页动图
  • 织梦做网站教程网站风格要求
  • 网站制作用什么编程百度贴吧网页版登录
  • 站长之家ip查询雄安哪里在建设
  • wdcp创建网站网站开发如何找甲方
  • 做网站运营用什么软件高校支付网站建设费需要入无形资产
  • 在那个网站做ppt可以赚钱网页代码怎么看
  • 免费做企业网站广州萝岗网站建设
  • 开奖网站怎么做wordpress添加广告
  • 开网站需要投资多少钱网站设计两边为什么要留白
  • 任丘市做网站价格泰州网络科技有限公司
  • wap网站使用微信登陆推广公司有哪些
  • 深圳分销网站设计制作买了winhost网站空间在哪里登陆
  • 培训网站项目ppt怎么做wordpress主题4mudi