mirror of
https://gitee.com/dromara/sa-token.git
synced 2025-09-19 01:58:05 +08:00
完善文档
This commit is contained in:
@@ -26,7 +26,7 @@ public class GlobalException {
|
|||||||
|
|
||||||
// 打印堆栈,以供调试
|
// 打印堆栈,以供调试
|
||||||
System.out.println("全局异常---------------");
|
System.out.println("全局异常---------------");
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
|
||||||
// 不同异常返回不同状态码
|
// 不同异常返回不同状态码
|
||||||
AjaxJson aj = null;
|
AjaxJson aj = null;
|
||||||
|
@@ -19,7 +19,7 @@ sa-token:
|
|||||||
# 是否输出操作日志
|
# 是否输出操作日志
|
||||||
is-log: true
|
is-log: true
|
||||||
|
|
||||||
spring:
|
spring:
|
||||||
# redis配置
|
# redis配置
|
||||||
redis:
|
redis:
|
||||||
# Redis数据库索引(默认为0)
|
# Redis数据库索引(默认为0)
|
||||||
|
@@ -428,6 +428,12 @@ Caused by: java.lang.ClassNotFoundException: cn.dev33.satoken.same.SaSameTemplat
|
|||||||
- (2) 在自定义StpUtil类加上类似 @Component 的注解让容器启动时扫描到自动初始化
|
- (2) 在自定义StpUtil类加上类似 @Component 的注解让容器启动时扫描到自动初始化
|
||||||
|
|
||||||
|
|
||||||
|
### Q:使用拦截器鉴权,访问一个不存在的 path 时,springboot 会自动在控制台打印一下异常。
|
||||||
|
可尝试添加以下配置解决:
|
||||||
|
``` properties
|
||||||
|
spring.resources.add-mappings=false
|
||||||
|
spring.mvc.throw-exception-if-no-handler-found=true
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user