SpringBoot+SpringSecurity+JWT+MybatisPlus实现基于注解的权限验证

上传者: fuu123f | 上传时间: 2022-05-25 11:30:21 | 文件大小: 39KB | 文件类型: ZIP
SpringBoot+SpringSecurity+JWT+MybatisPlus实现基于注解的权限验证,可根据注解的格式不同,做到角色权限控制,角色加资源权限控制等,粒度比较细化。 @PreAuthorize("hasAnyRole('ADMIN','USER')"):具有admin或user角色的用户可以访问。 @PreAuthorize("hasRole('ADMIN') and hasRole('USER')"):具有admin和user角色的用户可以访问 文章地址:https://blog.csdn.net/fuu123f/article/details/108233463

文件下载

资源详情

[{"title":"( 47 个子文件 39KB ) SpringBoot+SpringSecurity+JWT+MybatisPlus实现基于注解的权限验证","children":[{"title":"security","children":[{"title":"src","children":[{"title":"main","children":[{"title":"resources","children":[{"title":"mapper","children":[{"title":"SysUserRoleDao.xml <span style='color:#111;'> 215B </span>","children":null,"spread":false},{"title":"SysRoleDao.xml <span style='color:#111;'> 212B </span>","children":null,"spread":false},{"title":"SysMenuDao.xml <span style='color:#111;'> 211B </span>","children":null,"spread":false},{"title":"SysRoleMenuDao.xml <span style='color:#111;'> 215B </span>","children":null,"spread":false},{"title":"SysUserDao.xml <span style='color:#111;'> 827B </span>","children":null,"spread":false}],"spread":true},{"title":"application.yml <span style='color:#111;'> 1.66KB </span>","children":null,"spread":false}],"spread":true},{"title":"java","children":[{"title":"com","children":[{"title":"sbs","children":[{"title":"security","children":[{"title":"dao","children":[{"title":"SysMenuDao.java <span style='color:#111;'> 320B </span>","children":null,"spread":false},{"title":"SysRoleMenuDao.java <span style='color:#111;'> 346B </span>","children":null,"spread":false},{"title":"SysRoleDao.java <span style='color:#111;'> 333B </span>","children":null,"spread":false},{"title":"SysUserDao.java <span style='color:#111;'> 961B </span>","children":null,"spread":false},{"title":"SysUserRoleDao.java <span style='color:#111;'> 362B </span>","children":null,"spread":false}],"spread":true},{"title":"controller","children":[{"title":"AdminController.java <span style='color:#111;'> 4.30KB </span>","children":null,"spread":false},{"title":"UserController.java <span style='color:#111;'> 2.10KB </span>","children":null,"spread":false},{"title":"IndexController.java <span style='color:#111;'> 916B </span>","children":null,"spread":false}],"spread":true},{"title":"model","children":[{"title":"SysUserEntity.java <span style='color:#111;'> 625B </span>","children":null,"spread":false},{"title":"SysMenuEntity.java <span style='color:#111;'> 568B </span>","children":null,"spread":false},{"title":"SysRoleMenuEntity.java <span style='color:#111;'> 566B </span>","children":null,"spread":false},{"title":"SysUserRoleEntity.java <span style='color:#111;'> 566B </span>","children":null,"spread":false},{"title":"SysRoleEntity.java <span style='color:#111;'> 515B </span>","children":null,"spread":false}],"spread":true},{"title":"util","children":[{"title":"ResultUtil.java <span style='color:#111;'> 2.27KB </span>","children":null,"spread":false},{"title":"SecurityUtil.java <span style='color:#111;'> 859B </span>","children":null,"spread":false},{"title":"JWTTokenUtil.java <span style='color:#111;'> 1.50KB </span>","children":null,"spread":false}],"spread":true},{"title":"security","children":[{"title":"pojo","children":[{"title":"SelfUserEntity.java <span style='color:#111;'> 1.50KB </span>","children":null,"spread":false}],"spread":true},{"title":"handler","children":[{"title":"UserAuthAccessDeniedHandler.java <span style='color:#111;'> 858B </span>","children":null,"spread":false},{"title":"UserLoginSuccessHandler.java <span style='color:#111;'> 1.49KB </span>","children":null,"spread":false},{"title":"UserAuthenticationEntryPointHandler.java <span style='color:#111;'> 867B </span>","children":null,"spread":false},{"title":"UserLoginFailureHandler.java <span style='color:#111;'> 1.90KB </span>","children":null,"spread":false},{"title":"UserLogoutSuccessHandler.java <span style='color:#111;'> 1.18KB </span>","children":null,"spread":false}],"spread":false},{"title":"jwt","children":[{"title":"JWTAuthenticationTokenFilter.java <span style='color:#111;'> 3.80KB </span>","children":null,"spread":false}],"spread":false},{"title":"service","children":[{"title":"SelfUserDetailsService.java <span style='color:#111;'> 1.38KB </span>","children":null,"spread":false}],"spread":false},{"title":"UserPermissionEvaluator.java <span style='color:#111;'> 2.24KB </span>","children":null,"spread":false},{"title":"UserAuthenticationProvider.java <span style='color:#111;'> 3.10KB </span>","children":null,"spread":false}],"spread":true},{"title":"service","children":[{"title":"SysUserService.java <span style='color:#111;'> 1.13KB </span>","children":null,"spread":false},{"title":"SysUserRoleService.java <span style='color:#111;'> 320B </span>","children":null,"spread":false},{"title":"SysRoleService.java <span style='color:#111;'> 299B </span>","children":null,"spread":false},{"title":"impl","children":[{"title":"SysRoleMenuServiceImpl.java <span style='color:#111;'> 556B </span>","children":null,"spread":false},{"title":"SysUserRoleServiceImpl.java <span style='color:#111;'> 556B </span>","children":null,"spread":false},{"title":"SysUserServiceImpl.java <span style='color:#111;'> 1.81KB </span>","children":null,"spread":false},{"title":"SysRoleServiceImpl.java <span style='color:#111;'> 515B </span>","children":null,"spread":false},{"title":"SysMenuServiceImpl.java <span style='color:#111;'> 515B </span>","children":null,"spread":false}],"spread":false},{"title":"SysMenuService.java <span style='color:#111;'> 299B </span>","children":null,"spread":false},{"title":"SysRoleMenuService.java <span style='color:#111;'> 320B </span>","children":null,"spread":false}],"spread":true},{"title":"SecurityApplication.java <span style='color:#111;'> 410B </span>","children":null,"spread":false},{"title":"config","children":[{"title":"JWTConfig.java <span style='color:#111;'> 1.17KB </span>","children":null,"spread":false},{"title":"SecurityConfig.java <span style='color:#111;'> 4.92KB </span>","children":null,"spread":false}],"spread":false}],"spread":true}],"spread":true}],"spread":true}],"spread":true}],"spread":true}],"spread":true},{"title":"pom.xml <span style='color:#111;'> 3.13KB </span>","children":null,"spread":false},{"title":"security.iml <span style='color:#111;'> 10.11KB </span>","children":null,"spread":false}],"spread":true}],"spread":true}]

评论信息

免责申明

【只为小站】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【只为小站】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【只为小站】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,zhiweidada#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明