统一版本号管理、文档部分依赖本地化

This commit is contained in:
click33 2022-04-23 14:14:49 +08:00
parent 8e3bb4db6b
commit 7302a34de0
9 changed files with 38 additions and 12 deletions

View File

@ -87,7 +87,7 @@
</configuration>
</plugin>
<!-- 版本号管理 -->
<!-- 统一版本号管理 -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>flatten-maven-plugin</artifactId>

View File

@ -9,7 +9,8 @@
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<link rel="shortcut icon" type="image/x-icon" href="logo.png">
<link rel="stylesheet" href="./lib/index.css">
<link rel="stylesheet" href="https://unpkg.zhimg.com/docsify@4.11.3/lib/themes/vue.css">
<link rel="stylesheet" href="./lib/vue.css">
<!--<link rel="stylesheet" href="https://unpkg.zhimg.com/docsify@4.11.3/lib/themes/vue.css">-->
<script type="text/javascript" src="https://cdn.wwads.cn/js/makemoney.js" async></script>
</head>
<body>
@ -153,11 +154,11 @@
<script src="https://unpkg.zhimg.com/docsify-copy-code@2.1.0/dist/docsify-copy-code.min.js"></script>
<script src="https://unpkg.zhimg.com/prismjs@1.20.0/components/prism-java.min.js"></script>
<!-- 搜索框 -->
<script src="https://cdn.jsdelivr.net/npm/docsify/lib/plugins/search.min.js"></script>
<script src="lib/search.min.js"></script>
<!-- 多 tab 切换 -->
<script src="https://unpkg.zhimg.com/docsify-tabs@1.4.4"></script>
<script src="lib/docsify-tabs.min.js"></script>
<!-- img点击放大 -->
<script src="https://cdn.jsdelivr.net/npm/docsify/lib/plugins/zoom-image.min.js"></script>
<script src="lib/zoom-image.min.js"></script>
<!-- sidebar折叠 -->
<!-- <link rel="stylesheet" href="//cdn.jsdelivr.net/npm/docsify-sidebar-collapse/dist/sidebar.min.css" />

File diff suppressed because one or more lines are too long

1
sa-token-doc/doc/lib/search.min.js vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -35,7 +35,7 @@
对于网关服务,大体来讲分为两种:
- 一种是基于Servlet模型的Zuul我们需要引入的是`sa-token-spring-boot-starter`,详细戳:[在SpringBoot环境集成](/start/example)
- 一种是基于Reactor模型的SpringCloud Gateway、ShenYu、Fizz Gateway 等等,我们需要引入的是:`sa-token-reactor-spring-boot-starter`**并且注册全局过滤器!**,详细戳:[在WebFlux环境集成](/start/webflux-example)
- 一种是基于Reactor模型的SpringCloud Gateway、ShenYu 等等,我们需要引入的是:`sa-token-reactor-spring-boot-starter`**并且注册全局过滤器!**,详细戳:[在WebFlux环境集成](/start/webflux-example)
注:切不可直接在一个项目里同时引入这两个依赖,否则会造成项目无法启动

View File

@ -14,15 +14,24 @@ Http Basic 是 http 协议中最基础的认证方式,其有两个特点:
``` java
@RequestMapping("test3")
public SaResult test3() {
try {
SaBasicUtil.check("sa:123456");
} catch(NotBasicAuthException e) {
System.out.println("校验失败处理");
}
SaBasicUtil.check("sa:123456");
// ... 其它代码
return SaResult.ok();
}
```
全局异常处理:
``` java
@RestControllerAdvice
public class GlobalExceptionHandler {
@ExceptionHandler
public SaResult handlerException(Exception e) {
e.printStackTrace();
return SaResult.error(e.getMessage());
}
}
```
然后我们访问这个接口时,浏览器会强制弹出一个表单:
![sa-basic.png](https://oss.dev33.cn/sa-token/doc/sa-basic.png 's-w-sh')

View File

@ -253,7 +253,7 @@
<img src="https://oss.dev33.cn/sa-token/link/liteflow.png" msg="轻量,快速,稳定,可编排的组件式流程引擎">
</a>
<a href="https://hutool.cn/" target="_blank">
<img src="https://cdn.jsdelivr.net/gh/looly/hutool-site/images/logo.jpg" msg="🍬小而全的Java工具类库使Java拥有函数式语言般的优雅让Java语言也可以“甜甜的”。">
<img src="https://plus.hutool.cn/images/logo.jpg" msg="🍬小而全的Java工具类库使Java拥有函数式语言般的优雅让Java语言也可以“甜甜的”。">
</a>
<a href="https://dromara.org/zh/projects/" target="_blank">
<img src="https://oss.dev33.cn/sa-token/link/dromara.png" msg="让每一位开源爱好者,体会到开源的快乐。">
@ -426,6 +426,10 @@
if(img.getAttribute('nf') != null) {
return;
}
// 如果不是oss上的图片
if(img.src.indexOf('https://oss.dev33.cn') == -1) {
return;
}
img.src = img.src + "?x-oss-process=image/resize,m_lfit,w_" + (img.width) + ",limit_0/auto-orient,0";
}