diff --git a/sa-token-doc/doc/fun/not-login-scene.md b/sa-token-doc/doc/fun/not-login-scene.md
index 456d66e1..9fbf766d 100644
--- a/sa-token-doc/doc/fun/not-login-scene.md
+++ b/sa-token-doc/doc/fun/not-login-scene.md
@@ -21,38 +21,38 @@
``` java
- // 全局异常拦截(拦截项目中的NotLoginException异常)
- @ExceptionHandler(NotLoginException.class)
- public AjaxJson handlerNotLoginException(NotLoginException nle, HttpServletRequest request, HttpServletResponse response)
- throws Exception {
+// 全局异常拦截(拦截项目中的NotLoginException异常)
+@ExceptionHandler(NotLoginException.class)
+public AjaxJson handlerNotLoginException(NotLoginException nle, HttpServletRequest request, HttpServletResponse response)
+ throws Exception {
- // 打印堆栈,以供调试
- nle.printStackTrace();
-
- // 判断场景值,定制化异常信息
- String message = "";
- if(nle.getType().equals(NotLoginException.NOT_TOKEN)) {
- message = "未提供token";
- }
- else if(nle.getType().equals(NotLoginException.INVALID_TOKEN)) {
- message = "token无效";
- }
- else if(nle.getType().equals(NotLoginException.TOKEN_TIMEOUT)) {
- message = "token已过期";
- }
- else if(nle.getType().equals(NotLoginException.BE_REPLACED)) {
- message = "token已被顶下线";
- }
- else if(nle.getType().equals(NotLoginException.KICK_OUT)) {
- message = "token已被踢下线";
- }
- else {
- message = "当前会话未登录";
- }
-
- // 返回给前端
- return AjaxJson.getError(message);
+ // 打印堆栈,以供调试
+ nle.printStackTrace();
+
+ // 判断场景值,定制化异常信息
+ String message = "";
+ if(nle.getType().equals(NotLoginException.NOT_TOKEN)) {
+ message = "未提供token";
}
+ else if(nle.getType().equals(NotLoginException.INVALID_TOKEN)) {
+ message = "token无效";
+ }
+ else if(nle.getType().equals(NotLoginException.TOKEN_TIMEOUT)) {
+ message = "token已过期";
+ }
+ else if(nle.getType().equals(NotLoginException.BE_REPLACED)) {
+ message = "token已被顶下线";
+ }
+ else if(nle.getType().equals(NotLoginException.KICK_OUT)) {
+ message = "token已被踢下线";
+ }
+ else {
+ message = "当前会话未登录";
+ }
+
+ // 返回给前端
+ return AjaxJson.getError(message);
+}
```
diff --git a/sa-token-doc/doc/fun/token-timeout.md b/sa-token-doc/doc/fun/token-timeout.md
index 783f490f..cd8af6e9 100644
--- a/sa-token-doc/doc/fun/token-timeout.md
+++ b/sa-token-doc/doc/fun/token-timeout.md
@@ -34,10 +34,10 @@
例如以下代码:
``` java
- // 先检查是否已过期
- StpUtil.checkActivityTimeout();
- // 检查通过后继续续签
- StpUtil.updateLastActivityToNow();
+// 先检查是否已过期
+StpUtil.checkActivityTimeout();
+// 检查通过后继续续签
+StpUtil.updateLastActivityToNow();
```
同时,你还可以关闭框架的自动续签(在配置文件中配置 `autoRenew=false` ),此时续签操作完全由开发者控制,框架不再自动进行任何续签操作
diff --git a/sa-token-doc/doc/index.html b/sa-token-doc/doc/index.html
index 3d0c9143..7511552c 100644
--- a/sa-token-doc/doc/index.html
+++ b/sa-token-doc/doc/index.html
@@ -77,14 +77,30 @@
].join('');
return html + footer;
});
+ // 每次路由切换时数据全部加载完成后调用,没有参数。
+ hook.doneEach(function() {
+ $('pre code').each(function(){
+ var lines = $(this).text().split('\n').length;
+ var $numbering = $('