1
0
mirror of synced 2026-05-22 14:43:15 +00:00

完善注释

This commit is contained in:
click33
2022-08-21 07:27:15 +08:00
parent 1fa09ea314
commit bdb671d3c2
4 changed files with 9 additions and 7 deletions
+1 -1
View File
@@ -76,7 +76,7 @@
- [[ chaos ]](https://gitee.com/qishanor/chaos):一个基于 SpringBoot + Sa-Token + Mybatis-Plus的快速开发框架,前端vue-element-avue,内置代码生成器,代码最简洁,最佳学习实践方案。 - [[ chaos ]](https://gitee.com/qishanor/chaos):一个基于 SpringBoot + Sa-Token + Mybatis-Plus的快速开发框架,前端vue-element-avue,内置代码生成器,代码最简洁,最佳学习实践方案。
- [[ Pig-Satoken ]](https://gitee.com/wchenyang/cloud-satoken):重写Pig授权方式为Satoken,其他代码不变 - [[ Pig-Satoken ]](https://gitee.com/wchenyang/cloud-satoken):重写 Pig 授权方式为 Sa-Token其他代码不变
@@ -12,6 +12,7 @@ import cn.dev33.satoken.strategy.SaStrategy;
/** /**
* Sa-Token 注解式鉴权 - 拦截器 * Sa-Token 注解式鉴权 - 拦截器
* <h2> [ 当前拦截器写法已过期,可能将在以后的版本删除,推荐升级为 SaInterceptor ] </h2>
* *
* @author kong * @author kong
*/ */
@@ -79,8 +79,9 @@ public class SaInterceptor implements HandlerInterceptor {
try { try {
// 获取此请求对应的 Method 处理函数 if(isAnnotation && handler instanceof HandlerMethod) {
if(handler instanceof HandlerMethod) {
// 获取此请求对应的 Method 处理函数
Method method = ((HandlerMethod) handler).getMethod(); Method method = ((HandlerMethod) handler).getMethod();
// 如果此 Method 或其所属 Class 标注了 @SaIgnore,则忽略掉鉴权 // 如果此 Method 或其所属 Class 标注了 @SaIgnore,则忽略掉鉴权
@@ -89,9 +90,7 @@ public class SaInterceptor implements HandlerInterceptor {
} }
// 注解校验 // 注解校验
if(isAnnotation) { SaStrategy.me.checkMethodAnnotation.accept(method);
SaStrategy.me.checkMethodAnnotation.accept(method);
}
} }
// Auth 校验 // Auth 校验
@@ -13,7 +13,9 @@ import cn.dev33.satoken.servlet.model.SaResponseForServlet;
import cn.dev33.satoken.stp.StpUtil; import cn.dev33.satoken.stp.StpUtil;
/** /**
* Sa-Token 拦截式鉴权 - 拦截器 * Sa-Token 拦截式鉴权 - 拦截器
* <h2> [ 当前拦截器写法已过期,可能将在以后的版本删除,推荐升级为 SaInterceptor ] </h2>
*
* @author kong * @author kong
*/ */
@Deprecated @Deprecated