修复路由拦截鉴权可被绕过的问题 fix #515

This commit is contained in:
click33
2023-10-16 16:02:19 +08:00
parent f2416a6175
commit 954efeb732
33 changed files with 688 additions and 79 deletions

View File

@@ -1,10 +1,11 @@
package com.pj.test;
import cn.dev33.satoken.context.SaHolder;
import cn.dev33.satoken.spring.SpringMVCUtil;
import cn.dev33.satoken.util.SaResult;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import cn.dev33.satoken.util.SaResult;
/**
* 测试专用Controller
* @author click33
@@ -27,4 +28,13 @@ public class TestController {
return SaResult.ok();
}
// 测试 浏览器访问: http://localhost:8081/test/getRequestPath
@RequestMapping("getRequestPath")
public SaResult getRequestPath() {
System.out.println("-------------- 测试请求 path 获取");
System.out.println("request.getRequestURI() " + SpringMVCUtil.getRequest().getRequestURI());
System.out.println("saRequest.getRequestPath() " + SaHolder.getRequest().getRequestPath());
return SaResult.ok();
}
}

View File

@@ -19,7 +19,7 @@ sa-token:
# 是否输出操作日志
is-log: true
spring:
spring:
data:
# redis配置
redis: