feat: satoken修改
This commit is contained in:
@@ -26,8 +26,11 @@ public class SaTokenConfigure implements WebMvcConfigurer {
|
|||||||
.notMatch("/swagger-ui.html")
|
.notMatch("/swagger-ui.html")
|
||||||
.notMatch("/v3/api-docs/**")
|
.notMatch("/v3/api-docs/**")
|
||||||
.notMatch("/webjars/**")
|
.notMatch("/webjars/**")
|
||||||
|
.notMatch("/error")
|
||||||
|
.notMatch("/sse/**")
|
||||||
.check(r -> StpUtil.checkLogin());
|
.check(r -> StpUtil.checkLogin());
|
||||||
})).addPathPatterns("/**");
|
})).addPathPatterns("/**")
|
||||||
|
.excludePathPatterns("/error", "/sse/**");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -37,8 +37,7 @@ public class SseController {
|
|||||||
/**
|
/**
|
||||||
* 建立 SSE 订阅连接
|
* 建立 SSE 订阅连接
|
||||||
*
|
*
|
||||||
* 需要登录鉴权(Sa-Token 自动校验)。
|
* 需要登录鉴权(Sa-Token 通过 Cookie 自动校验,EventSource 同域请求自动携带)。
|
||||||
* EventSource API 不支持自定义请求头,token 通过 URL 查询参数 ?token=xxx 传递。
|
|
||||||
*
|
*
|
||||||
* @return SseEmitter 实例(30 分钟超时)
|
* @return SseEmitter 实例(30 分钟超时)
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user