shiro
iamlzjoco
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
使用spring boot+shiro+jwt+mybatis-plus搭建项目框架
1.创建spring boot项目,并导入依赖pom.xml <dependencies> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> <depende原创 2020-07-27 15:09:57 · 508 阅读 · 0 评论 -
spring boot多模块项目一个模块引用另一个模块的实体类报错空指针
项目结构:server模块引用shiro模块中的实体类,server中的controller代码: @RestControllerpublic class ApiController { @PostMapping("/api") public String sdc(){ Rfgcgl yhmc = new Rfgcgl().selectOne(new QueryWrapper<Rfgcgl>().eq("YHMC", "系统管理"));原创 2020-07-21 16:39:17 · 7340 阅读 · 0 评论 -
报错Submitted credentials for token did not match the expected credentials
原因:前端传token到后台,后台接收token的时候token的值被双引号包含了,所以后台对接收到的token进行了去双引号处理,结果报错如标题。解决方案:前端传token的时候不要带双引号即可。原创 2020-07-14 15:46:17 · 2945 阅读 · 0 评论 -
前后端分离报错The Token’s Signature resulted invalid when verified using the Algorithm: HmacSHA256
框架spring boot+shiro+jwt.验证token的时候报错如标题,经检查发现,前端传的token是"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE1OTQ2OTUwMTYsInVzZXJuYW1lIjoi6ZO25bu65YWs5Y-4In0.4QHmHVCelLaaMe1H2n8iHPFq2PJwq5oimhMMqzhXjFk"后台接收的时候变成了""eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.e原创 2020-07-14 15:43:35 · 14771 阅读 · 1 评论 -
spring boot+shiro+vue前后端分离时,获取不到session
登录成功后,获取用户对应的菜单树,结果报错session失效。controller: @ApiOperation("用户登录")@ApiImplicitParams({@ApiImplicitParam(value = "用户名", name = "username",defaultValue = "系统管理",dataType = "String",paramType="query"), @ApiImplicitParam(value = "密码", name = "pa原创 2020-07-10 16:50:32 · 1815 阅读 · 1 评论 -
springboot+shiro框架中上传到服务器的图片不能查看,访问404
1.在application.properties文件中配置静态资源映射路径 #上传成功后的图片可以通过IP+端口/upload/图片名称进行访问spring.mvc.static-path-pattern=/upload/**#Windows系统上图片上传成功后在本地磁盘的地址spring.resources.static-locations=file:E:/ideaWorkSpace/codes/tjcompany/#Windows系统上图片上传成功后在本地磁盘的地址api.bas原创 2020-07-01 16:31:26 · 1351 阅读 · 0 评论 -
spring boot+shiro中使用@RequiresRoles不生效,访问报错404
解决方案:在shiroConfig中添加以下代码: /** * 开启aop注解支持 * 即在controller中使用 @RequiresPermissions("user/userList") */@Beanpublic AuthorizationAttributeSourceAdvisor authorizationAttributeSourceAdvisor(SecurityManager securityManager){ AuthorizationAttributeS原创 2020-07-01 11:46:14 · 1224 阅读 · 1 评论
分享