Skip to content

Commit ed768bc

Browse files
author
litongjava
committed
update InterceptorConfiguration
1 parent d8c33a5 commit ed768bc

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

docs/zh/03_配置/01.md

+1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
- `tio.mvc.request.printReport`:设置是否打印请求信息。这通常在开发环境下使用,以便于跟踪和调试。
2020
- `http.multipart.max-request-size`: 设置请求体的大小
2121
- `http.multipart.max-file-size`: 设置上传文件的大小
22+
- `tio.http.request.printUrl` : 打印请求地址
2223
- `app.env`:定义应用的运行环境。根据 `app.env` 的不同值,可以加载不同的配置文件,以适应不同的开发、测试或生产环境。
2324

2425
tio-boot 配置参考源码 com.litongjava.tio.boot.constatns.ConfigKeys

docs/zh/08_token/02.md

+6-1
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ public class SaTokenConfiguration {
7575
import com.litongjava.jfinal.aop.annotation.AConfiguration;
7676
import com.litongjava.jfinal.aop.annotation.AInitialization;
7777
import com.litongjava.tio.boot.http.interceptor.HttpServerInterceptorModel;
78+
import com.litongjava.tio.boot.http.interceptor.ServerInteceptorConfigure;
7879
import com.litongjava.tio.boot.satoken.SaTokenInterceptor;
7980
import com.litongjava.tio.boot.server.TioBootServer;
8081

@@ -90,11 +91,15 @@ public class InterceptorConfiguration {
9091
model.addblockeUrl("/**"); // 拦截所有路由
9192
model.addAlloweUrls("/register/*", "/auth/*"); // 设置例外路由
9293

94+
ServerInteceptorConfigure serverInteceptorConfigure = new ServerInteceptorConfigure();
95+
serverInteceptorConfigure.add(model);
9396
// 将拦截器配置添加到 Tio 服务器
94-
TioBootServer.getServerInteceptorConfigure().add(model);
97+
TioBootServer.me().setServerInteceptorConfigure(serverInteceptorConfigure);
9598
}
9699
}
97100

101+
102+
98103
```
99104

100105
#### 实现登录和登出逻辑

0 commit comments

Comments
 (0)