diff --git a/README.md b/README.md
index 3916621f..d932058b 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,5 @@
-
+
@@ -18,15 +18,28 @@
* [BladeTool](https://github.com/chillzhuang/blade-tool)已推送至Maven中央库,直接引入即可,减少了工程的臃肿,也可更注重于业务开发
* 集成Sentinel从流量控制、熔断降级、系统负载等多个维度保护服务的稳定性。
* 注册中心、配置中心选型Nacos,为工程瘦身的同时加强各模块之间的联动。
-* 使用Traefik进行反向代理,监听后台变化自动化应用新的配置文件。
* 极简封装了多租户底层,用更少的代码换来拓展性更强的SaaS多租户系统。
-* 借鉴OAuth2,实现了多终端认证系统,可控制子系统的token权限互相隔离。
-* 借鉴Security,封装了Secure模块,采用JWT做Token认证,可拓展集成Redis等细颗粒度控制方案。
-* 稳定生产了三年,经历了从 Camden -> Hoxton -> 2021 的技术架构,也经历了从fat jar -> docker -> k8s + jenkins的部署架构。
+* 借鉴OAuth2,自研多终端认证系统,可控制子系统的token权限互相隔离。
+* 借鉴Security,自研Secure模块,采用JWT做Token认证,可拓展集成Redis等细颗粒度控制方案。
+* 稳定生产了六年,经历了从 Camden -> Hoxton -> 2023 的技术架构,也经历了从fat jar -> docker -> k8s + jenkins的部署架构。
* 项目分包明确,规范微服务的开发模式,使包与包之间的分工清晰。
## 架构图
-
+
+
+## 核心技术栈
+
+| 技术栈 | 版本 |
+|----------------------|------------|
+| Java | 17+ |
+| NodeJS | 18+ |
+| Spring | 6.1.10 |
+| Spring Boot | 3.2.7 |
+| Spring Cloud | 2023.0.2 |
+| Spring Cloud Alibaba | 2023.0.1.0 |
+| Nacos Alibaba | 2.3.2 |
+| Mybatis Plus | 3.5.7 |
+
## 工程结构
```
@@ -53,40 +66,68 @@ SpringBlade
```
## 官方信息
-* 官网地址:[https://bladex.cn](https://bladex.cn)
-* 问答社区:[https://sns.bladex.cn](https://sns.bladex.cn)
-* 会员计划:[SpringBlade会员计划](https://gitee.com/smallc/SpringBlade/wikis/SpringBlade会员计划)
-* 交流一群:`477853168`(满)
-* 交流二群:`751253339`(满)
-* 交流三群:`784729540`(满)
-* 交流四群:`1034621754`(满)
-* 交流五群:`946350912`(满)
-* 交流六群:`511624269`(满)
-* 交流七群:`298061704`
-
-## 在线演示
-* Saber-基于Vue:[https://saber.bladex.cn](https://saber.bladex.cn)
-* Sword-基于React:[https://sword.bladex.cn](https://sword.bladex.cn)
-
-## 数据大屏
-* 数据大屏展示系统:[https://data.bladex.cn](https://data.bladex.cn)
+
+| 简介 | 内容 |
+|------|-------------------------------------------------------------------------------|
+| 官网地址 | [https://bladex.cn](https://bladex.cn) |
+| 问答社区 | [https://sns.bladex.cn](https://sns.bladex.cn) |
+| 会员计划 | [SpringBlade会员计划](https://gitee.com/smallc/SpringBlade/wikis/SpringBlade会员计划) |
+| 交流一群 | `477853168` (满) |
+| 交流二群 | `751253339` (满) |
+| 交流三群 | `784729540` (满) |
+| 交流四群 | `1034621754` (满) |
+| 交流五群 | `946350912` (满) |
+| 交流六群 | `511624269` (满) |
+| 交流七群 | `298061704` |
+
+## 官方产品
+
+| 简介 | 演示地址 |
+|---------------|------------------------------------------------------|
+| BladeX企业级开发平台 | [https://saber3.bladex.cn](https://saber3.bladex.cn) |
+| BladeX可视化数据大屏 | [https://data.bladex.cn](https://data.bladex.cn) |
+| BladeX物联网开发平台 | [https://iot.bladex.cn](https://iot.bladex.cn) |
+
+## 前端项目
+
+| 简介 | 地址 |
+|--------------------|----------------------------------------------------------------------------------------------------|
+| 前端框架Sword(基于React) | [https://gitee.com/smallc/Sword](https://gitee.com/smallc/Sword) |
+| 前端框架Saber(基于Vue2) | [https://gitee.com/smallc/Saber](https://gitee.com/smallc/Saber) |
+| 前端框架Saber3(基于Vue3) | [https://gitee.com/smallc/Saber3](https://gitee.com/smallc/Saber/tree/3.x/) |
+
+## 后端项目
+| 简介 | 地址 |
+|---------------|----------------------------------------------------------------------------------------------------|
+| 核心框架项目地址 | [https://gitee.com/smallc/blade-tool](https://gitee.com/smallc/blade-tool) |
+| 后端Gitee地址 | [https://gitee.com/smallc/SpringBlade](https://gitee.com/smallc/SpringBlade) |
+| 后端Github地址 | [https://github.com/chillzhuang/SpringBlade](https://github.com/chillzhuang/SpringBlade) |
+| 后端SpringBoot版 | [https://gitee.com/smallc/SpringBlade/tree/boot/](https://gitee.com/smallc/SpringBlade/tree/boot/) |
+
+## 安全手册
+| 简介 | 地址 |
+|-----------|----------------------------------------------------------------------------------------------------|
+| Blade安全手册 | [https://www.kancloud.cn/smallchill/blade-safety](https://www.kancloud.cn/smallchill/blade-safety) |
## 技术文档
-* [SpringBlade开发手册一览](https://gitee.com/smallc/SpringBlade/wikis/SpringBlade开发手册)
-* [SpringBlade常见问题集锦](https://sns.bladex.cn/article-14966.html)
-* [SpringBlade基于Kuboard部署K8S](https://kuboard.cn/learning/k8s-practice/spring-blade/)
-* [SpringBlade基于Rainbond部署](https://www.rainbond.com/docs/micro-service/example/blade)
-
-## 项目地址
-* 核心框架项目地址:[https://gitee.com/smallc/blade-tool](https://gitee.com/smallc/blade-tool)
-* 后端Gitee地址:[https://gitee.com/smallc/SpringBlade](https://gitee.com/smallc/SpringBlade)
-* 后端Github地址:[https://github.com/chillzhuang/SpringBlade](https://github.com/chillzhuang/SpringBlade)
-* 后端SpringBoot版:[https://gitee.com/smallc/SpringBlade/tree/boot/](https://gitee.com/smallc/SpringBlade/tree/boot/)
-* 前端框架Sword(基于React):[https://gitee.com/smallc/Sword](https://gitee.com/smallc/Sword)
-* 前端框架Saber(基于Vue2):[https://gitee.com/smallc/Saber](https://gitee.com/smallc/Saber)
-* 前端框架Saber3(基于Vue3):[https://gitee.com/smallc/Saber3](https://gitee.com/smallc/Saber/tree/3.x/)
-
-# 开源协议
+
+| 简介 | 地址 |
+|---------------------------|--------------------------------------------------------------------------------------------------------------------------|
+| SpringBlade开发手册一览 | [https://gitee.com/smallc/SpringBlade/wikis/SpringBlade开发手册](https://gitee.com/smallc/SpringBlade/wikis/SpringBlade开发手册) |
+| SpringBlade常见问题集锦 | [https://sns.bladex.cn/article-14966.html](https://sns.bladex.cn/article-14966.html) |
+| SpringBlade基于Kuboard部署K8S | [https://kuboard.cn/learning/k8s-practice/spring-blade/](https://kuboard.cn/learning/k8s-practice/spring-blade/) |
+| SpringBlade基于Rainbond部署 | [https://www.rainbond.com/docs/micro-service/example/blade](https://www.rainbond.com/docs/micro-service/example/blade) |
+
+
+## 免费公开课
+
+
+ |
+ |
+
+
+
+## 开源协议
Apache Licence 2.0 ([英文原文](http://www.apache.org/licenses/LICENSE-2.0.html))
Apache Licence是著名的非盈利开源组织Apache采用的协议。该协议和BSD类似,同样鼓励代码共享和尊重原作者的著作权,同样允许代码修改,再发布(作为开源或商业软件)。
需要满足的条件如下:
@@ -94,95 +135,9 @@ Apache Licence是著名的非盈利开源组织Apache采用的协议。该协议
* 如果你修改了代码,需要在被修改的文件中说明。
* 在延伸的代码中(修改和有源代码衍生的代码中)需要带有原来代码中的协议,商标,专利声明和其他原来作者规定需要包含的说明。
* 如果再发布的产品中包含一个Notice文件,则在Notice文件中需要带有Apache Licence。你可以在Notice中增加自己的许可,但不可以表现为对Apache Licence构成更改。
-Apache Licence也是对商业应用友好的许可。使用者也可以在需要的时候修改代码来满足需要并作为开源或商业产品发布/销售。
+ Apache Licence也是对商业应用友好的许可。使用者也可以在需要的时候修改代码来满足需要并作为开源或商业产品发布/销售。
## 用户权益
* 允许免费用于学习、毕设、公司项目、私活等,但请保留源码作者信息。
* 对未经过授权和不遵循 Apache 2.0 协议二次开源或者商业化我们将追究到底。
-* 参考请注明:参考自 SpringBlade:https://gitee.com/smallc/SpringBlade。
-
-# 界面
-
-## [BladeX](https://bladex.cn/#/vip) 工作流一览
-
-
- |
- |
-
-
- |
- |
-
-
- |
- |
-
-
-
-## [Sword](https://gitee.com/smallc/Sword) 界面一览
-
-
- |
- |
-
-
- |
- |
-
-
- |
- |
-
-
- |
- |
-
-
- |
- |
-
-
-
-## [Saber](https://gitee.com/smallc/Saber) 界面一览
-
-
- |
- |
-
-
- |
- |
-
-
- |
- |
-
-
-
-## 监控界面一览
-
-
- |
- |
-
-
- |
- |
-
-
- |
- |
-
-
- |
- |
-
-
- |
- |
-
-
- |
- |
-
-
+* 参考请注明:参考自 SpringBlade:https://gitee.com/smallc/SpringBlade。
\ No newline at end of file
diff --git a/blade-auth/pom.xml b/blade-auth/pom.xml
index 4f73a838..98cd480b 100644
--- a/blade-auth/pom.xml
+++ b/blade-auth/pom.xml
@@ -8,7 +8,7 @@
SpringBlade
org.springblade
- 4.0.0
+ 4.1.0
blade-auth
diff --git a/blade-auth/src/main/java/org/springblade/auth/controller/AuthController.java b/blade-auth/src/main/java/org/springblade/auth/controller/AuthController.java
index ef45124f..3f9babff 100644
--- a/blade-auth/src/main/java/org/springblade/auth/controller/AuthController.java
+++ b/blade-auth/src/main/java/org/springblade/auth/controller/AuthController.java
@@ -16,9 +16,9 @@
package org.springblade.auth.controller;
import com.wf.captcha.SpecCaptcha;
-import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
+import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.AllArgsConstructor;
import org.springblade.auth.granter.ITokenGranter;
import org.springblade.auth.granter.TokenGranterBuilder;
@@ -54,11 +54,11 @@ public class AuthController {
@PostMapping("token")
@Operation(summary = "获取认证token", description = "传入租户ID:tenantId,账号:account,密码:password")
- public R token(@Parameter(name = "授权类型", required = true) @RequestParam(defaultValue = "password", required = false) String grantType,
- @Parameter(name = "刷新令牌") @RequestParam(required = false) String refreshToken,
- @Parameter(name = "租户ID", required = true) @RequestParam(defaultValue = "000000", required = false) String tenantId,
- @Parameter(name = "账号") @RequestParam(required = false) String account,
- @Parameter(name = "密码") @RequestParam(required = false) String password) {
+ public R token(@Parameter(description = "授权类型", required = true) @RequestParam(defaultValue = "password", required = false) String grantType,
+ @Parameter(description = "刷新令牌") @RequestParam(required = false) String refreshToken,
+ @Parameter(description = "租户ID", required = true) @RequestParam(defaultValue = "000000", required = false) String tenantId,
+ @Parameter(description = "账号") @RequestParam(required = false) String account,
+ @Parameter(description = "密码") @RequestParam(required = false) String password) {
String userType = Func.toStr(WebUtil.getRequest().getHeader(TokenUtil.USER_TYPE_HEADER_KEY), TokenUtil.DEFAULT_USER_TYPE);
@@ -92,4 +92,11 @@ public R captcha() {
return R.data(Kv.init().set("key", key).set("image", specCaptcha.toBase64()));
}
+ @PostMapping("/logout")
+ @Operation(summary = "登出")
+ public R logout() {
+ // 登出预留逻辑
+ return R.data(Kv.init().set("code", "200").set("msg", "操作成功"));
+ }
+
}
diff --git a/blade-auth/src/main/java/org/springblade/auth/granter/CaptchaTokenGranter.java b/blade-auth/src/main/java/org/springblade/auth/granter/CaptchaTokenGranter.java
index 2bf81bd1..0762f935 100644
--- a/blade-auth/src/main/java/org/springblade/auth/granter/CaptchaTokenGranter.java
+++ b/blade-auth/src/main/java/org/springblade/auth/granter/CaptchaTokenGranter.java
@@ -20,6 +20,7 @@
import org.springblade.auth.utils.TokenUtil;
import org.springblade.common.cache.CacheNames;
import org.springblade.core.log.exception.ServiceException;
+import org.springblade.core.secure.props.BladeAuthProperties;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.*;
import org.springblade.system.user.entity.UserInfo;
@@ -42,6 +43,8 @@ public class CaptchaTokenGranter implements ITokenGranter {
private IUserClient userClient;
private RedisUtil redisUtil;
+ private BladeAuthProperties authProperties;
+
@Override
public UserInfo grant(TokenParameter tokenParameter) {
HttpServletRequest request = WebUtil.getRequest();
@@ -62,14 +65,17 @@ public UserInfo grant(TokenParameter tokenParameter) {
if (Func.isNoneBlank(account, password)) {
// 获取用户类型
String userType = tokenParameter.getArgs().getStr("userType");
+ // 解密密码
+ String decryptPassword = TokenUtil.decryptPassword(password, authProperties.getPublicKey(), authProperties.getPrivateKey());
+ // 定义返回结果
R result;
// 根据不同用户类型调用对应的接口返回数据,用户可自行拓展
if (userType.equals(BladeUserEnum.WEB.getName())) {
- result = userClient.userInfo(tenantId, account, DigestUtil.encrypt(password));
+ result = userClient.userInfo(tenantId, account, DigestUtil.encrypt(decryptPassword));
} else if (userType.equals(BladeUserEnum.APP.getName())) {
- result = userClient.userInfo(tenantId, account, DigestUtil.encrypt(password));
+ result = userClient.userInfo(tenantId, account, DigestUtil.encrypt(decryptPassword));
} else {
- result = userClient.userInfo(tenantId, account, DigestUtil.encrypt(password));
+ result = userClient.userInfo(tenantId, account, DigestUtil.encrypt(decryptPassword));
}
userInfo = result.isSuccess() ? result.getData() : null;
}
diff --git a/blade-auth/src/main/java/org/springblade/auth/granter/PasswordTokenGranter.java b/blade-auth/src/main/java/org/springblade/auth/granter/PasswordTokenGranter.java
index 9572a6a5..908135a2 100644
--- a/blade-auth/src/main/java/org/springblade/auth/granter/PasswordTokenGranter.java
+++ b/blade-auth/src/main/java/org/springblade/auth/granter/PasswordTokenGranter.java
@@ -17,6 +17,8 @@
import lombok.AllArgsConstructor;
import org.springblade.auth.enums.BladeUserEnum;
+import org.springblade.auth.utils.TokenUtil;
+import org.springblade.core.secure.props.BladeAuthProperties;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.DigestUtil;
import org.springblade.core.tool.utils.Func;
@@ -37,6 +39,8 @@ public class PasswordTokenGranter implements ITokenGranter {
private IUserClient userClient;
+ private BladeAuthProperties authProperties;
+
@Override
public UserInfo grant(TokenParameter tokenParameter) {
String tenantId = tokenParameter.getArgs().getStr("tenantId");
@@ -46,14 +50,17 @@ public UserInfo grant(TokenParameter tokenParameter) {
if (Func.isNoneBlank(account, password)) {
// 获取用户类型
String userType = tokenParameter.getArgs().getStr("userType");
+ // 解密密码
+ String decryptPassword = TokenUtil.decryptPassword(password, authProperties.getPublicKey(), authProperties.getPrivateKey());
+ // 定义返回结果
R result;
// 根据不同用户类型调用对应的接口返回数据,用户可自行拓展
if (userType.equals(BladeUserEnum.WEB.getName())) {
- result = userClient.userInfo(tenantId, account, DigestUtil.encrypt(password));
+ result = userClient.userInfo(tenantId, account, DigestUtil.encrypt(decryptPassword));
} else if (userType.equals(BladeUserEnum.APP.getName())) {
- result = userClient.userInfo(tenantId, account, DigestUtil.encrypt(password));
+ result = userClient.userInfo(tenantId, account, DigestUtil.encrypt(decryptPassword));
} else {
- result = userClient.userInfo(tenantId, account, DigestUtil.encrypt(password));
+ result = userClient.userInfo(tenantId, account, DigestUtil.encrypt(decryptPassword));
}
userInfo = result.isSuccess() ? result.getData() : null;
}
diff --git a/blade-auth/src/main/java/org/springblade/auth/utils/TokenUtil.java b/blade-auth/src/main/java/org/springblade/auth/utils/TokenUtil.java
index 5de8370b..82231f12 100644
--- a/blade-auth/src/main/java/org/springblade/auth/utils/TokenUtil.java
+++ b/blade-auth/src/main/java/org/springblade/auth/utils/TokenUtil.java
@@ -20,6 +20,9 @@
import org.springblade.core.secure.TokenInfo;
import org.springblade.core.secure.utils.SecureUtil;
import org.springblade.core.tool.utils.Func;
+import org.springblade.core.tool.utils.SM2Util;
+import org.springblade.core.tool.utils.StringPool;
+import org.springblade.core.tool.utils.StringUtil;
import org.springblade.system.user.entity.User;
import org.springblade.system.user.entity.UserInfo;
@@ -43,7 +46,8 @@ public class TokenUtil {
public final static String USER_NOT_FOUND = "用户名或密码错误";
public final static String HEADER_KEY = "Authorization";
public final static String HEADER_PREFIX = "Basic ";
- public final static String DEFAULT_AVATAR = "https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png";
+ public final static String ENCRYPT_PREFIX = "04";
+ public final static String DEFAULT_AVATAR = "https://bladex.cn/images/logo.png";
/**
* 创建认证token
@@ -97,4 +101,31 @@ private static TokenInfo createRefreshToken(UserInfo userInfo) {
return SecureUtil.createJWT(param, "audience", "issuser", TokenConstant.REFRESH_TOKEN);
}
+ /**
+ * 解析国密sm2加密密码
+ *
+ * @param rawPassword 请求时提交的原密码
+ * @param publicKey 公钥
+ * @param privateKey 私钥
+ * @return 解密后的密码
+ */
+ public static String decryptPassword(String rawPassword, String publicKey, String privateKey) {
+ // 其中有空则匹配失败
+ if (StringUtil.isAnyBlank(publicKey, privateKey)) {
+ return StringPool.EMPTY;
+ }
+ // 处理部分工具类加密不带04前缀的情况
+ if (!StringUtil.startsWithIgnoreCase(rawPassword, ENCRYPT_PREFIX)) {
+ rawPassword = ENCRYPT_PREFIX + rawPassword;
+ }
+ // 解密密码
+ String decryptPassword = SM2Util.decrypt(rawPassword, privateKey);
+ // 签名校验
+ boolean isVerified = SM2Util.verify(decryptPassword, SM2Util.sign(decryptPassword, privateKey), publicKey);
+ if (!isVerified) {
+ return StringPool.EMPTY;
+ }
+ return decryptPassword;
+ }
+
}
diff --git a/blade-auth/src/test/java/org/springblade/test/AesKeyGenerator.java b/blade-auth/src/test/java/org/springblade/test/AesKeyGenerator.java
deleted file mode 100644
index 0ea6c91a..00000000
--- a/blade-auth/src/test/java/org/springblade/test/AesKeyGenerator.java
+++ /dev/null
@@ -1,23 +0,0 @@
-package org.springblade.test;
-
-import org.springblade.core.tool.utils.AesUtil;
-
-/**
- * aesKey生成器
- *
- * @author Chill
- */
-public class AesKeyGenerator {
-
- public static void main(String[] args) {
- System.out.println("=======================================================");
- for (int i = 0; i < 10; i++) {
- String aesKey = AesUtil.genAesKey();
- System.out.println("SpringBlade AesKey:[" + aesKey + "] ");
- }
- System.out.println("=======================================================");
- System.out.println("====== blade.token.aes-key 的值从中挑选一个便可 =========");
- System.out.println("=======================================================");
- }
-
-}
diff --git a/blade-auth/src/test/java/org/springblade/test/SignKeyGenerator.java b/blade-auth/src/test/java/org/springblade/test/SignKeyGenerator.java
index fd1aa61d..0878fc35 100644
--- a/blade-auth/src/test/java/org/springblade/test/SignKeyGenerator.java
+++ b/blade-auth/src/test/java/org/springblade/test/SignKeyGenerator.java
@@ -1,5 +1,6 @@
package org.springblade.test;
+import org.springblade.core.tool.utils.AesUtil;
import org.springblade.core.tool.utils.RandomType;
import org.springblade.core.tool.utils.StringUtil;
@@ -11,13 +12,12 @@
public class SignKeyGenerator {
public static void main(String[] args) {
- System.out.println("=======================================================");
- for (int i = 0; i < 10; i++) {
- String signKey = StringUtil.random(32, RandomType.ALL);
- System.out.println("SpringBlade SignKey:[" + signKey + "] ");
- }
- System.out.println("=======================================================");
- System.out.println("====== blade.token.sign-key 的值从中挑选一个便可 =========");
+ System.out.println("=========== blade.token.sign-key 配置如下 ==============");
+ System.out.println("#blade配置\n" +
+ "blade:\n" +
+ " token:\n" +
+ " sign-key: " + StringUtil.random(32, RandomType.ALL) +"\n" +
+ " aes-key: " + AesUtil.genAesKey() );
System.out.println("=======================================================");
}
diff --git a/blade-auth/src/test/java/org/springblade/test/Sm2KeyGenerator.java b/blade-auth/src/test/java/org/springblade/test/Sm2KeyGenerator.java
new file mode 100644
index 00000000..e527cbf6
--- /dev/null
+++ b/blade-auth/src/test/java/org/springblade/test/Sm2KeyGenerator.java
@@ -0,0 +1,46 @@
+package org.springblade.test;
+
+import org.bouncycastle.crypto.AsymmetricCipherKeyPair;
+import org.bouncycastle.util.encoders.Hex;
+import org.springblade.core.tool.utils.SM2Util;
+import org.springblade.core.tool.utils.StringPool;
+
+/**
+ * signKey生成器
+ *
+ * @author Chill
+ */
+public class Sm2KeyGenerator {
+
+ public static void main(String[] args) {
+ System.out.println("================ blade.auth 配置如下 =================");
+ AsymmetricCipherKeyPair keyPair = SM2Util.generateKeyPair();
+ String publicKey = SM2Util.getPublicKeyString(keyPair);
+ String privateKey = SM2Util.getPrivateKeyString(keyPair);
+ System.out.println("#blade配置 \n" +
+ "blade:\n" +
+ " auth:\n" +
+ " public-key: " + publicKey + "\n" +
+ " private-key: " + privateKey);
+ System.out.println("=======================================================");
+ System.out.println(StringPool.EMPTY);
+ System.out.println("============== saber website.js 配置如下 ===============");
+ System.out.println("//saber配置\n" +
+ "auth: {\n" +
+ " publicKey: '" + publicKey + "',\n" +
+ "}");
+ System.out.println("=======================================================");
+ System.out.println(StringPool.EMPTY);
+ System.out.println("============== 密码:[admin] 加密流程如下 ================");
+ String password = "admin";
+ byte[] encryptedData = SM2Util.encrypt(password, publicKey);
+ String decryptedText = SM2Util.decrypt(encryptedData, privateKey);
+ System.out.println("加密前: " + password);
+ System.out.println("加密后: " + Hex.toHexString(encryptedData));
+ System.out.println("解密后: " + decryptedText);
+ System.out.println("请注意: 此密文为前端加密后调用token接口的密码参数");
+ System.out.println("=======================================================");
+
+ }
+
+}
diff --git a/blade-common/pom.xml b/blade-common/pom.xml
index 4fa1dce5..d9e356f0 100644
--- a/blade-common/pom.xml
+++ b/blade-common/pom.xml
@@ -5,7 +5,7 @@
SpringBlade
org.springblade
- 4.0.0
+ 4.1.0
4.0.0
diff --git a/blade-gateway/pom.xml b/blade-gateway/pom.xml
index 12478300..43849e86 100644
--- a/blade-gateway/pom.xml
+++ b/blade-gateway/pom.xml
@@ -5,7 +5,7 @@
SpringBlade
org.springblade
- 4.0.0
+ 4.1.0
4.0.0
diff --git a/blade-ops/blade-admin/pom.xml b/blade-ops/blade-admin/pom.xml
index a3bdc508..ff6e41bf 100644
--- a/blade-ops/blade-admin/pom.xml
+++ b/blade-ops/blade-admin/pom.xml
@@ -5,7 +5,7 @@
blade-ops
org.springblade
- 4.0.0
+ 4.1.0
4.0.0
diff --git a/blade-ops/blade-develop/pom.xml b/blade-ops/blade-develop/pom.xml
index 74f8538e..5feaef11 100644
--- a/blade-ops/blade-develop/pom.xml
+++ b/blade-ops/blade-develop/pom.xml
@@ -6,7 +6,7 @@
org.springblade
blade-ops
- 4.0.0
+ 4.1.0
4.0.0
diff --git a/blade-ops/blade-develop/src/main/java/org/springblade/develop/controller/CodeController.java b/blade-ops/blade-develop/src/main/java/org/springblade/develop/controller/CodeController.java
index 37fdf0e4..121ed7f2 100644
--- a/blade-ops/blade-develop/src/main/java/org/springblade/develop/controller/CodeController.java
+++ b/blade-ops/blade-develop/src/main/java/org/springblade/develop/controller/CodeController.java
@@ -103,7 +103,7 @@ public R submit(@Valid @RequestBody Code code) {
@PostMapping("/remove")
@ApiOperationSupport(order = 4)
@Operation(summary = "删除", description = "传入ids")
- public R remove(@Parameter(name = "主键集合", required = true) @RequestParam String ids) {
+ public R remove(@Parameter(description = "主键集合", required = true) @RequestParam String ids) {
return R.status(codeService.removeByIds(Func.toLongList(ids)));
}
@@ -113,7 +113,7 @@ public R remove(@Parameter(name = "主键集合", required = true) @RequestParam
@PostMapping("/copy")
@ApiOperationSupport(order = 5)
@Operation(summary = "复制", description = "传入id")
- public R copy(@Parameter(name = "主键", required = true) @RequestParam Long id) {
+ public R copy(@Parameter(description = "主键", required = true) @RequestParam Long id) {
Code code = codeService.getById(id);
code.setId(null);
code.setCodeName(code.getCodeName() + "-copy");
@@ -126,7 +126,7 @@ public R copy(@Parameter(name = "主键", required = true) @RequestParam Long id
@PostMapping("/gen-code")
@ApiOperationSupport(order = 6)
@Operation(summary = "代码生成", description = "传入ids")
- public R genCode(@Parameter(name = "主键集合", required = true) @RequestParam String ids, @RequestParam(defaultValue = "sword") String system) {
+ public R genCode(@Parameter(description = "主键集合", required = true) @RequestParam String ids, @RequestParam(defaultValue = "sword") String system) {
Collection codes = codeService.listByIds(Func.toLongList(ids));
codes.forEach(code -> {
BladeCodeGenerator generator = new BladeCodeGenerator();
diff --git a/blade-ops/blade-develop/src/main/java/org/springblade/develop/controller/DatasourceController.java b/blade-ops/blade-develop/src/main/java/org/springblade/develop/controller/DatasourceController.java
index 6ba4fe73..cf16eb41 100644
--- a/blade-ops/blade-develop/src/main/java/org/springblade/develop/controller/DatasourceController.java
+++ b/blade-ops/blade-develop/src/main/java/org/springblade/develop/controller/DatasourceController.java
@@ -106,7 +106,7 @@ public R submit(@Valid @RequestBody Datasource datasource) {
@PostMapping("/remove")
@ApiOperationSupport(order = 7)
@Operation(summary = "逻辑删除", description = "传入ids")
- public R remove(@Parameter(name = "主键集合", required = true) @RequestParam String ids) {
+ public R remove(@Parameter(description = "主键集合", required = true) @RequestParam String ids) {
return R.status(datasourceService.deleteLogic(Func.toLongList(ids)));
}
diff --git a/blade-ops/blade-develop/src/main/resources/templates/controller.java.vm b/blade-ops/blade-develop/src/main/resources/templates/controller.java.vm
index f4d18fce..e83cd27d 100644
--- a/blade-ops/blade-develop/src/main/resources/templates/controller.java.vm
+++ b/blade-ops/blade-develop/src/main/resources/templates/controller.java.vm
@@ -159,7 +159,7 @@ public class $!{table.controllerName} {
@PostMapping("/remove")
@ApiOperationSupport(order = 7)
@Operation(summary = "逻辑删除", description = "传入ids")
- public R remove(@Parameter(name = "主键集合", required = true) @RequestParam String ids) {
+ public R remove(@Parameter(description = "主键集合", required = true) @RequestParam String ids) {
return R.status($!{table.entityPath}Service.deleteLogic(Func.toLongList(ids)));
}
@@ -171,7 +171,7 @@ public class $!{table.controllerName} {
@PostMapping("/remove")
@ApiOperationSupport(order = 8)
@Operation(summary = "删除", description = "传入ids")
- public R remove(@Parameter(name = "主键集合", required = true) @RequestParam String ids) {
+ public R remove(@Parameter(description = "主键集合", required = true) @RequestParam String ids) {
return R.status($!{table.entityPath}Service.removeByIds(Func.toLongList(ids)));
}
diff --git a/blade-ops/blade-develop/src/test/resources/templates/controller.java.vm b/blade-ops/blade-develop/src/test/resources/templates/controller.java.vm
index f4d18fce..e83cd27d 100644
--- a/blade-ops/blade-develop/src/test/resources/templates/controller.java.vm
+++ b/blade-ops/blade-develop/src/test/resources/templates/controller.java.vm
@@ -159,7 +159,7 @@ public class $!{table.controllerName} {
@PostMapping("/remove")
@ApiOperationSupport(order = 7)
@Operation(summary = "逻辑删除", description = "传入ids")
- public R remove(@Parameter(name = "主键集合", required = true) @RequestParam String ids) {
+ public R remove(@Parameter(description = "主键集合", required = true) @RequestParam String ids) {
return R.status($!{table.entityPath}Service.deleteLogic(Func.toLongList(ids)));
}
@@ -171,7 +171,7 @@ public class $!{table.controllerName} {
@PostMapping("/remove")
@ApiOperationSupport(order = 8)
@Operation(summary = "删除", description = "传入ids")
- public R remove(@Parameter(name = "主键集合", required = true) @RequestParam String ids) {
+ public R remove(@Parameter(description = "主键集合", required = true) @RequestParam String ids) {
return R.status($!{table.entityPath}Service.removeByIds(Func.toLongList(ids)));
}
diff --git a/blade-ops/blade-report/pom.xml b/blade-ops/blade-report/pom.xml
index 2020991c..00701f32 100644
--- a/blade-ops/blade-report/pom.xml
+++ b/blade-ops/blade-report/pom.xml
@@ -5,7 +5,7 @@
org.springblade
blade-ops
- 4.0.0
+ 4.1.0
4.0.0
diff --git a/blade-ops/blade-resource/pom.xml b/blade-ops/blade-resource/pom.xml
index f81caf76..71c4f583 100644
--- a/blade-ops/blade-resource/pom.xml
+++ b/blade-ops/blade-resource/pom.xml
@@ -5,7 +5,7 @@
blade-ops
org.springblade
- 4.0.0
+ 4.1.0
4.0.0
diff --git a/blade-ops/blade-seata-order/pom.xml b/blade-ops/blade-seata-order/pom.xml
index 9642750b..fd0e5a18 100644
--- a/blade-ops/blade-seata-order/pom.xml
+++ b/blade-ops/blade-seata-order/pom.xml
@@ -5,7 +5,7 @@
blade-ops
org.springblade
- 4.0.0
+ 4.1.0
4.0.0
diff --git a/blade-ops/blade-seata-storage/pom.xml b/blade-ops/blade-seata-storage/pom.xml
index 4ed5602a..2e47698c 100644
--- a/blade-ops/blade-seata-storage/pom.xml
+++ b/blade-ops/blade-seata-storage/pom.xml
@@ -5,7 +5,7 @@
blade-ops
org.springblade
- 4.0.0
+ 4.1.0
4.0.0
diff --git a/blade-ops/pom.xml b/blade-ops/pom.xml
index c1dac492..0e6a19a0 100644
--- a/blade-ops/pom.xml
+++ b/blade-ops/pom.xml
@@ -5,13 +5,13 @@
SpringBlade
org.springblade
- 4.0.0
+ 4.1.0
4.0.0
blade-ops
${project.artifactId}
- 4.0.0
+ 4.1.0
pom
blade-admin
diff --git a/blade-service-api/blade-demo-api/pom.xml b/blade-service-api/blade-demo-api/pom.xml
index 611f074b..ca02cb57 100644
--- a/blade-service-api/blade-demo-api/pom.xml
+++ b/blade-service-api/blade-demo-api/pom.xml
@@ -5,7 +5,7 @@
blade-service-api
org.springblade
- 4.0.0
+ 4.1.0
4.0.0
diff --git a/blade-service-api/blade-desk-api/pom.xml b/blade-service-api/blade-desk-api/pom.xml
index fe424f6d..352c0b2f 100644
--- a/blade-service-api/blade-desk-api/pom.xml
+++ b/blade-service-api/blade-desk-api/pom.xml
@@ -5,7 +5,7 @@
blade-service-api
org.springblade
- 4.0.0
+ 4.1.0
4.0.0
diff --git a/blade-service-api/blade-dict-api/pom.xml b/blade-service-api/blade-dict-api/pom.xml
index 61245fb6..5e386bed 100644
--- a/blade-service-api/blade-dict-api/pom.xml
+++ b/blade-service-api/blade-dict-api/pom.xml
@@ -5,7 +5,7 @@
blade-service-api
org.springblade
- 4.0.0
+ 4.1.0
4.0.0
diff --git a/blade-service-api/blade-scope-api/pom.xml b/blade-service-api/blade-scope-api/pom.xml
index cdfba6f7..809309f0 100644
--- a/blade-service-api/blade-scope-api/pom.xml
+++ b/blade-service-api/blade-scope-api/pom.xml
@@ -5,7 +5,7 @@
blade-service-api
org.springblade
- 4.0.0
+ 4.1.0
4.0.0
diff --git a/blade-service-api/blade-system-api/pom.xml b/blade-service-api/blade-system-api/pom.xml
index eea1c817..facdbfef 100644
--- a/blade-service-api/blade-system-api/pom.xml
+++ b/blade-service-api/blade-system-api/pom.xml
@@ -5,7 +5,7 @@
blade-service-api
org.springblade
- 4.0.0
+ 4.1.0
4.0.0
diff --git a/blade-service-api/blade-user-api/pom.xml b/blade-service-api/blade-user-api/pom.xml
index 18ebda8c..6f639faf 100644
--- a/blade-service-api/blade-user-api/pom.xml
+++ b/blade-service-api/blade-user-api/pom.xml
@@ -5,7 +5,7 @@
blade-service-api
org.springblade
- 4.0.0
+ 4.1.0
4.0.0
diff --git a/blade-service-api/pom.xml b/blade-service-api/pom.xml
index de057cd5..e2219067 100644
--- a/blade-service-api/pom.xml
+++ b/blade-service-api/pom.xml
@@ -5,13 +5,13 @@
SpringBlade
org.springblade
- 4.0.0
+ 4.1.0
4.0.0
blade-service-api
${project.artifactId}
- 4.0.0
+ 4.1.0
pom
SpringBlade 微服务API集合
diff --git a/blade-service/blade-demo/pom.xml b/blade-service/blade-demo/pom.xml
index db20c4b7..dd5f812d 100644
--- a/blade-service/blade-demo/pom.xml
+++ b/blade-service/blade-demo/pom.xml
@@ -5,7 +5,7 @@
blade-service
org.springblade
- 4.0.0
+ 4.1.0
4.0.0
diff --git a/blade-service/blade-demo/src/main/java/com/example/demo/controller/NoticeController.java b/blade-service/blade-demo/src/main/java/com/example/demo/controller/NoticeController.java
index 7cbc955d..438fb2a4 100644
--- a/blade-service/blade-demo/src/main/java/com/example/demo/controller/NoticeController.java
+++ b/blade-service/blade-demo/src/main/java/com/example/demo/controller/NoticeController.java
@@ -111,7 +111,7 @@ public R submit(@RequestBody Notice notice) {
@PostMapping("/remove")
@ApiOperationSupport(order = 6)
@Operation(summary = "逻辑删除", description = "传入notice")
- public R remove(@Parameter(name = "主键集合") @RequestParam String ids) {
+ public R remove(@Parameter(description = "主键集合") @RequestParam String ids) {
boolean temp = noticeService.deleteLogic(Func.toLongList(ids));
return R.status(temp);
}
diff --git a/blade-service/blade-desk/pom.xml b/blade-service/blade-desk/pom.xml
index 2c5a998e..765e3b09 100644
--- a/blade-service/blade-desk/pom.xml
+++ b/blade-service/blade-desk/pom.xml
@@ -6,7 +6,7 @@
org.springblade
blade-service
- 4.0.0
+ 4.1.0
4.0.0
diff --git a/blade-service/blade-desk/src/main/java/org/springblade/desk/controller/NoticeController.java b/blade-service/blade-desk/src/main/java/org/springblade/desk/controller/NoticeController.java
index 8c19135d..729a8614 100644
--- a/blade-service/blade-desk/src/main/java/org/springblade/desk/controller/NoticeController.java
+++ b/blade-service/blade-desk/src/main/java/org/springblade/desk/controller/NoticeController.java
@@ -114,7 +114,7 @@ public R submit(@RequestBody Notice notice) {
@PostMapping("/remove")
@ApiOperationSupport(order = 6)
@Operation(summary = "逻辑删除", description = "传入notice")
- public R remove(@Parameter(name = "主键集合") @RequestParam String ids) {
+ public R remove(@Parameter(description = "主键集合") @RequestParam String ids) {
boolean temp = noticeService.deleteLogic(Func.toLongList(ids));
return R.status(temp);
}
diff --git a/blade-service/blade-log/pom.xml b/blade-service/blade-log/pom.xml
index 1795f262..2bc5807b 100644
--- a/blade-service/blade-log/pom.xml
+++ b/blade-service/blade-log/pom.xml
@@ -5,7 +5,7 @@
blade-service
org.springblade
- 4.0.0
+ 4.1.0
4.0.0
diff --git a/blade-service/blade-system/pom.xml b/blade-service/blade-system/pom.xml
index 69ae8748..35798026 100644
--- a/blade-service/blade-system/pom.xml
+++ b/blade-service/blade-system/pom.xml
@@ -5,7 +5,7 @@
blade-service
org.springblade
- 4.0.0
+ 4.1.0
4.0.0
diff --git a/blade-service/blade-system/src/main/java/org/springblade/system/controller/AuthClientController.java b/blade-service/blade-system/src/main/java/org/springblade/system/controller/AuthClientController.java
index 6476bf9f..083123bc 100644
--- a/blade-service/blade-system/src/main/java/org/springblade/system/controller/AuthClientController.java
+++ b/blade-service/blade-system/src/main/java/org/springblade/system/controller/AuthClientController.java
@@ -109,7 +109,7 @@ public R submit(@Valid @RequestBody AuthClient authClient) {
@PostMapping("/remove")
@ApiOperationSupport(order = 6)
@Operation(summary = "逻辑删除", description = "传入ids")
- public R remove(@Parameter(name = "主键集合", required = true) @RequestParam String ids) {
+ public R remove(@Parameter(description = "主键集合", required = true) @RequestParam String ids) {
return R.status(clientService.deleteLogic(Func.toLongList(ids)));
}
diff --git a/blade-service/blade-system/src/main/java/org/springblade/system/controller/DataScopeController.java b/blade-service/blade-system/src/main/java/org/springblade/system/controller/DataScopeController.java
index 56ca5445..451b1501 100644
--- a/blade-service/blade-system/src/main/java/org/springblade/system/controller/DataScopeController.java
+++ b/blade-service/blade-system/src/main/java/org/springblade/system/controller/DataScopeController.java
@@ -112,7 +112,7 @@ public R submit(@Valid @RequestBody DataScope dataScope) {
@PostMapping("/remove")
@ApiOperationSupport(order = 6)
@Operation(summary = "逻辑删除", description = "传入ids")
- public R remove(@Parameter(name = "主键集合", required = true) @RequestParam String ids) {
+ public R remove(@Parameter(description = "主键集合", required = true) @RequestParam String ids) {
CacheUtil.clear(SYS_CACHE);
return R.status(dataScopeService.deleteLogic(Func.toLongList(ids)));
}
diff --git a/blade-service/blade-system/src/main/java/org/springblade/system/controller/DeptController.java b/blade-service/blade-system/src/main/java/org/springblade/system/controller/DeptController.java
index e55fd6a8..a655083d 100644
--- a/blade-service/blade-system/src/main/java/org/springblade/system/controller/DeptController.java
+++ b/blade-service/blade-system/src/main/java/org/springblade/system/controller/DeptController.java
@@ -109,7 +109,7 @@ public R submit(@Valid @RequestBody Dept dept) {
@PostMapping("/remove")
@ApiOperationSupport(order = 5)
@Operation(summary = "删除", description = "传入ids")
- public R remove(@Parameter(name = "主键集合", required = true) @RequestParam String ids) {
+ public R remove(@Parameter(description = "主键集合", required = true) @RequestParam String ids) {
return R.status(deptService.removeByIds(Func.toLongList(ids)));
}
diff --git a/blade-service/blade-system/src/main/java/org/springblade/system/controller/DictController.java b/blade-service/blade-system/src/main/java/org/springblade/system/controller/DictController.java
index a3ad8c99..b91767c2 100644
--- a/blade-service/blade-system/src/main/java/org/springblade/system/controller/DictController.java
+++ b/blade-service/blade-system/src/main/java/org/springblade/system/controller/DictController.java
@@ -111,7 +111,7 @@ public R submit(@Valid @RequestBody Dict dict) {
@CacheEvict(cacheNames = {DICT_LIST, DICT_VALUE}, allEntries = true)
@ApiOperationSupport(order = 5)
@Operation(summary = "删除", description = "传入ids")
- public R remove(@Parameter(name = "主键集合", required = true) @RequestParam String ids) {
+ public R remove(@Parameter(description = "主键集合", required = true) @RequestParam String ids) {
return R.status(dictService.removeByIds(Func.toLongList(ids)));
}
diff --git a/blade-service/blade-system/src/main/java/org/springblade/system/controller/MenuController.java b/blade-service/blade-system/src/main/java/org/springblade/system/controller/MenuController.java
index 51e082c5..c498a5a3 100644
--- a/blade-service/blade-system/src/main/java/org/springblade/system/controller/MenuController.java
+++ b/blade-service/blade-system/src/main/java/org/springblade/system/controller/MenuController.java
@@ -135,7 +135,7 @@ public R submit(@Valid @RequestBody Menu menu) {
@PreAuth(RoleConstant.HAS_ROLE_ADMIN)
@ApiOperationSupport(order = 6)
@Operation(summary = "删除", description = "传入ids")
- public R remove(@Parameter(name = "主键集合", required = true) @RequestParam String ids) {
+ public R remove(@Parameter(description = "主键集合", required = true) @RequestParam String ids) {
return R.status(menuService.removeByIds(Func.toLongList(ids)));
}
diff --git a/blade-service/blade-system/src/main/java/org/springblade/system/controller/ParamController.java b/blade-service/blade-system/src/main/java/org/springblade/system/controller/ParamController.java
index f49a3f52..3150845f 100644
--- a/blade-service/blade-system/src/main/java/org/springblade/system/controller/ParamController.java
+++ b/blade-service/blade-system/src/main/java/org/springblade/system/controller/ParamController.java
@@ -96,7 +96,7 @@ public R submit(@Valid @RequestBody Param param) {
@PostMapping("/remove")
@ApiOperationSupport(order = 4)
@Operation(summary = "逻辑删除", description = "传入ids")
- public R remove(@Parameter(name = "主键集合", required = true) @RequestParam String ids) {
+ public R remove(@Parameter(description = "主键集合", required = true) @RequestParam String ids) {
return R.status(paramService.deleteLogic(Func.toLongList(ids)));
}
diff --git a/blade-service/blade-system/src/main/java/org/springblade/system/controller/PostController.java b/blade-service/blade-system/src/main/java/org/springblade/system/controller/PostController.java
index dae25372..3519e063 100644
--- a/blade-service/blade-system/src/main/java/org/springblade/system/controller/PostController.java
+++ b/blade-service/blade-system/src/main/java/org/springblade/system/controller/PostController.java
@@ -123,7 +123,7 @@ public R submit(@Valid @RequestBody Post post) {
@PostMapping("/remove")
@ApiOperationSupport(order = 7)
@Operation(summary = "逻辑删除", description = "传入ids")
- public R remove(@Parameter(name = "主键集合", required = true) @RequestParam String ids) {
+ public R remove(@Parameter(description = "主键集合", required = true) @RequestParam String ids) {
return R.status(postService.deleteLogic(Func.toLongList(ids)));
}
diff --git a/blade-service/blade-system/src/main/java/org/springblade/system/controller/RegionController.java b/blade-service/blade-system/src/main/java/org/springblade/system/controller/RegionController.java
index fb2e730e..2818933f 100644
--- a/blade-service/blade-system/src/main/java/org/springblade/system/controller/RegionController.java
+++ b/blade-service/blade-system/src/main/java/org/springblade/system/controller/RegionController.java
@@ -141,7 +141,7 @@ public R submit(@Valid @RequestBody Region region) {
@PostMapping("/remove")
@ApiOperationSupport(order = 8)
@Operation(summary = "删除", description = "传入主键")
- public R remove(@Parameter(name = "主键", required = true) @RequestParam String id) {
+ public R remove(@Parameter(description = "主键", required = true) @RequestParam String id) {
return R.status(regionService.removeRegion(id));
}
diff --git a/blade-service/blade-system/src/main/java/org/springblade/system/controller/RoleController.java b/blade-service/blade-system/src/main/java/org/springblade/system/controller/RoleController.java
index e5d54e73..9585632a 100644
--- a/blade-service/blade-system/src/main/java/org/springblade/system/controller/RoleController.java
+++ b/blade-service/blade-system/src/main/java/org/springblade/system/controller/RoleController.java
@@ -128,7 +128,7 @@ public R submit(@Valid @RequestBody Role role, BladeUser user) {
@PostMapping("/remove")
@ApiOperationSupport(order = 6)
@Operation(summary = "删除", description = "传入ids")
- public R remove(@Parameter(name = "主键集合", required = true) @RequestParam String ids) {
+ public R remove(@Parameter(description = "主键集合", required = true) @RequestParam String ids) {
CacheUtil.clear(SYS_CACHE);
return R.status(roleService.removeByIds(Func.toLongList(ids)));
}
diff --git a/blade-service/blade-system/src/main/java/org/springblade/system/controller/TenantController.java b/blade-service/blade-system/src/main/java/org/springblade/system/controller/TenantController.java
index 520b6acc..1b1b4674 100644
--- a/blade-service/blade-system/src/main/java/org/springblade/system/controller/TenantController.java
+++ b/blade-service/blade-system/src/main/java/org/springblade/system/controller/TenantController.java
@@ -118,7 +118,7 @@ public R submit(@Valid @RequestBody Tenant tenant) {
*/
@PostMapping("/remove")
@Operation(summary = "逻辑删除", description = "传入ids")
- public R remove(@Parameter(name = "主键集合", required = true) @RequestParam String ids) {
+ public R remove(@Parameter(description = "主键集合", required = true) @RequestParam String ids) {
return R.status(tenantService.deleteLogic(Func.toLongList(ids)));
}
diff --git a/blade-service/blade-user/pom.xml b/blade-service/blade-user/pom.xml
index 6253841d..87f1e9dc 100644
--- a/blade-service/blade-user/pom.xml
+++ b/blade-service/blade-user/pom.xml
@@ -5,7 +5,7 @@
blade-service
org.springblade
- 4.0.0
+ 4.1.0
4.0.0
diff --git a/blade-service/blade-user/src/main/java/org/springblade/system/user/controller/UserController.java b/blade-service/blade-user/src/main/java/org/springblade/system/user/controller/UserController.java
index df7fcc32..d14a22a2 100644
--- a/blade-service/blade-user/src/main/java/org/springblade/system/user/controller/UserController.java
+++ b/blade-service/blade-user/src/main/java/org/springblade/system/user/controller/UserController.java
@@ -149,8 +149,8 @@ public R remove(@RequestParam String ids) {
@PostMapping("/grant")
@ApiOperationSupport(order = 7)
@Operation(summary = "权限设置", description = "传入roleId集合以及menuId集合")
- public R grant(@Parameter(name = "userId集合", required = true) @RequestParam String userIds,
- @Parameter(name = "roleId集合", required = true) @RequestParam String roleIds) {
+ public R grant(@Parameter(description = "userId集合", required = true) @RequestParam String userIds,
+ @Parameter(description = "roleId集合", required = true) @RequestParam String roleIds) {
boolean temp = userService.grant(userIds, roleIds);
return R.status(temp);
}
@@ -158,7 +158,7 @@ public R grant(@Parameter(name = "userId集合", required = true) @RequestParam
@PostMapping("/reset-password")
@ApiOperationSupport(order = 8)
@Operation(summary = "初始化密码", description = "传入userId集合")
- public R resetPassword(@Parameter(name = "userId集合", required = true) @RequestParam String userIds) {
+ public R resetPassword(@Parameter(description = "userId集合", required = true) @RequestParam String userIds) {
boolean temp = userService.resetPassword(userIds);
return R.status(temp);
}
@@ -174,9 +174,9 @@ public R resetPassword(@Parameter(name = "userId集合", required = true) @Reque
@PostMapping("/update-password")
@ApiOperationSupport(order = 9)
@Operation(summary = "修改密码", description = "传入密码")
- public R updatePassword(BladeUser user, @Parameter(name = "旧密码", required = true) @RequestParam String oldPassword,
- @Parameter(name = "新密码", required = true) @RequestParam String newPassword,
- @Parameter(name = "新密码", required = true) @RequestParam String newPassword1) {
+ public R updatePassword(BladeUser user, @Parameter(description = "旧密码", required = true) @RequestParam String oldPassword,
+ @Parameter(description = "新密码", required = true) @RequestParam String newPassword,
+ @Parameter(description = "新密码", required = true) @RequestParam String newPassword1) {
boolean temp = userService.updatePassword(user.getUserId(), oldPassword, newPassword, newPassword1);
return R.status(temp);
}
diff --git a/blade-service/pom.xml b/blade-service/pom.xml
index a190fa9a..1db479e4 100644
--- a/blade-service/pom.xml
+++ b/blade-service/pom.xml
@@ -7,12 +7,12 @@
org.springblade
SpringBlade
- 4.0.0
+ 4.1.0
blade-service
${project.artifactId}
- 4.0.0
+ 4.1.0
pom
SpringBlade 微服务集合
diff --git a/doc/nacos/blade.yaml b/doc/nacos/blade.yaml
index 3ffc1a08..1cd354ed 100644
--- a/doc/nacos/blade.yaml
+++ b/doc/nacos/blade.yaml
@@ -42,6 +42,10 @@ management:
health:
show-details: always
+#springdoc-openapi配置
+springdoc:
+ default-flat-param-object: true
+
#knife4j配置
knife4j:
#启用
@@ -69,7 +73,7 @@ knife4j:
swagger:
title: SpringBlade 接口文档系统
description: SpringBlade 接口文档系统
- version: 4.0.0
+ version: 4.1.0
license: Powered By SpringBlade
licenseUrl: https://bladex.cn
terms-of-service-url: https://bladex.cn
@@ -80,11 +84,16 @@ swagger:
#blade配置
blade:
+ auth:
+ #使用 @org.springblade.test.Sm2KeyGenerator 获取,用于国密sm2验签,需和前端保持一致
+ public-key: 请配置sm2公钥
+ #使用 @org.springblade.test.Sm2KeyGenerator 获取,用于国密sm2解密,前端无需配置
+ private-key: 请配置sm2私钥
token:
- #使用 blade-auth服务 @org.springblade.test.SignKeyGenerator 获取
- sign-key: 请配置32位签名提高安全性
- #使用 blade-auth服务 @org.springblade.test.AesKeyGenerator 获取
- aes-key: 请配置Aes的密钥
+ #使用 @org.springblade.test.SignKeyGenerator 获取
+ sign-key: 请配置32位签名
+ #使用 @org.springblade.test.SignKeyGenerator 获取
+ aes-key: 请配置cryptoKey
xss:
enabled: true
skip-url:
diff --git a/pic/bladex-flow1.png b/pic/bladex-flow1.png
deleted file mode 100644
index 31f26550..00000000
Binary files a/pic/bladex-flow1.png and /dev/null differ
diff --git a/pic/bladex-flow2.png b/pic/bladex-flow2.png
deleted file mode 100644
index d1e9604e..00000000
Binary files a/pic/bladex-flow2.png and /dev/null differ
diff --git a/pic/bladex-flow3.png b/pic/bladex-flow3.png
deleted file mode 100644
index 027f7324..00000000
Binary files a/pic/bladex-flow3.png and /dev/null differ
diff --git a/pic/bladex-flow4.png b/pic/bladex-flow4.png
deleted file mode 100644
index 98786ee0..00000000
Binary files a/pic/bladex-flow4.png and /dev/null differ
diff --git a/pic/bladex-flow5.png b/pic/bladex-flow5.png
deleted file mode 100644
index 875ce005..00000000
Binary files a/pic/bladex-flow5.png and /dev/null differ
diff --git a/pic/bladex-flow6.png b/pic/bladex-flow6.png
deleted file mode 100644
index ee11b526..00000000
Binary files a/pic/bladex-flow6.png and /dev/null differ
diff --git a/pic/saber-code.png b/pic/saber-code.png
deleted file mode 100644
index 130579ed..00000000
Binary files a/pic/saber-code.png and /dev/null differ
diff --git a/pic/saber-dict-select.png b/pic/saber-dict-select.png
deleted file mode 100644
index c2e34690..00000000
Binary files a/pic/saber-dict-select.png and /dev/null differ
diff --git a/pic/saber-dict.png b/pic/saber-dict.png
deleted file mode 100644
index d3dcefa2..00000000
Binary files a/pic/saber-dict.png and /dev/null differ
diff --git a/pic/saber-log.png b/pic/saber-log.png
deleted file mode 100644
index 05bfc574..00000000
Binary files a/pic/saber-log.png and /dev/null differ
diff --git a/pic/saber-role.png b/pic/saber-role.png
deleted file mode 100644
index b49bd038..00000000
Binary files a/pic/saber-role.png and /dev/null differ
diff --git a/pic/saber-user.png b/pic/saber-user.png
deleted file mode 100644
index 78756dab..00000000
Binary files a/pic/saber-user.png and /dev/null differ
diff --git a/pic/springblade-admin1.png b/pic/springblade-admin1.png
deleted file mode 100644
index be362acd..00000000
Binary files a/pic/springblade-admin1.png and /dev/null differ
diff --git a/pic/springblade-admin2.png b/pic/springblade-admin2.png
deleted file mode 100644
index cbfca541..00000000
Binary files a/pic/springblade-admin2.png and /dev/null differ
diff --git a/pic/springblade-framework.png b/pic/springblade-framework.png
deleted file mode 100644
index 8c1e8e18..00000000
Binary files a/pic/springblade-framework.png and /dev/null differ
diff --git a/pic/springblade-grafana.png b/pic/springblade-grafana.png
deleted file mode 100644
index 9dc318d4..00000000
Binary files a/pic/springblade-grafana.png and /dev/null differ
diff --git a/pic/springblade-harbor.png b/pic/springblade-harbor.png
deleted file mode 100644
index 5611bb49..00000000
Binary files a/pic/springblade-harbor.png and /dev/null differ
diff --git a/pic/springblade-k8s1.png b/pic/springblade-k8s1.png
deleted file mode 100644
index a86d0d7b..00000000
Binary files a/pic/springblade-k8s1.png and /dev/null differ
diff --git a/pic/springblade-k8s2.png b/pic/springblade-k8s2.png
deleted file mode 100644
index 6228ab88..00000000
Binary files a/pic/springblade-k8s2.png and /dev/null differ
diff --git a/pic/springblade-nacos.png b/pic/springblade-nacos.png
deleted file mode 100644
index 7a789b45..00000000
Binary files a/pic/springblade-nacos.png and /dev/null differ
diff --git a/pic/springblade-sentinel.png b/pic/springblade-sentinel.png
deleted file mode 100644
index 8e6e4e62..00000000
Binary files a/pic/springblade-sentinel.png and /dev/null differ
diff --git a/pic/springblade-swagger1.png b/pic/springblade-swagger1.png
deleted file mode 100644
index 5ac6e905..00000000
Binary files a/pic/springblade-swagger1.png and /dev/null differ
diff --git a/pic/springblade-swagger2.png b/pic/springblade-swagger2.png
deleted file mode 100644
index 66a8165f..00000000
Binary files a/pic/springblade-swagger2.png and /dev/null differ
diff --git a/pic/springblade-traefik-health.png b/pic/springblade-traefik-health.png
deleted file mode 100644
index 733172f2..00000000
Binary files a/pic/springblade-traefik-health.png and /dev/null differ
diff --git a/pic/springblade-traefik.png b/pic/springblade-traefik.png
deleted file mode 100644
index ccd95b24..00000000
Binary files a/pic/springblade-traefik.png and /dev/null differ
diff --git a/pic/sword-dict.png b/pic/sword-dict.png
deleted file mode 100644
index 89f8ed3b..00000000
Binary files a/pic/sword-dict.png and /dev/null differ
diff --git a/pic/sword-locale-cn.png b/pic/sword-locale-cn.png
deleted file mode 100644
index b832ae34..00000000
Binary files a/pic/sword-locale-cn.png and /dev/null differ
diff --git a/pic/sword-locale-us.png b/pic/sword-locale-us.png
deleted file mode 100644
index ebb8f325..00000000
Binary files a/pic/sword-locale-us.png and /dev/null differ
diff --git a/pic/sword-log.png b/pic/sword-log.png
deleted file mode 100644
index 08caf63d..00000000
Binary files a/pic/sword-log.png and /dev/null differ
diff --git a/pic/sword-main.png b/pic/sword-main.png
deleted file mode 100644
index c7984d35..00000000
Binary files a/pic/sword-main.png and /dev/null differ
diff --git a/pic/sword-menu-edit.png b/pic/sword-menu-edit.png
deleted file mode 100644
index a3bd0a1e..00000000
Binary files a/pic/sword-menu-edit.png and /dev/null differ
diff --git a/pic/sword-menu-icon.png b/pic/sword-menu-icon.png
deleted file mode 100644
index ccc0c58b..00000000
Binary files a/pic/sword-menu-icon.png and /dev/null differ
diff --git a/pic/sword-menu.png b/pic/sword-menu.png
deleted file mode 100644
index 43ee0308..00000000
Binary files a/pic/sword-menu.png and /dev/null differ
diff --git a/pic/sword-role.png b/pic/sword-role.png
deleted file mode 100644
index 3f640e28..00000000
Binary files a/pic/sword-role.png and /dev/null differ
diff --git a/pic/sword-user.png b/pic/sword-user.png
deleted file mode 100644
index 3414a334..00000000
Binary files a/pic/sword-user.png and /dev/null differ
diff --git a/pom.xml b/pom.xml
index 0d8dd48f..d5a279ed 100644
--- a/pom.xml
+++ b/pom.xml
@@ -5,12 +5,12 @@
org.springblade
SpringBlade
- 4.0.0
+ 4.1.0
pom
- 4.0.0
- 4.0.0
+ 4.1.0
+ 4.1.0
17
3.11.0
@@ -21,13 +21,13 @@
3.3.4
3.1.3
- 6.1.5
- 3.2.4
+ 6.1.10
+ 3.2.7
3.2.3
- 2023.0.1
+ 2023.0.2
- 2022.0.0.0
- 2.3.1
+ 2023.0.1.0
+ 2.3.2
10.211.55.5
diff --git a/script/docker/.env b/script/docker/.env
index b1a9ae12..3e87a4be 100644
--- a/script/docker/.env
+++ b/script/docker/.env
@@ -1,2 +1,2 @@
REGISTER=192.168.0.157/blade
-TAG=4.0.0
+TAG=4.1.0
diff --git a/script/docker/docker-compose.yml b/script/docker/docker-compose.yml
index be82eb72..f9e3d64d 100644
--- a/script/docker/docker-compose.yml
+++ b/script/docker/docker-compose.yml
@@ -1,13 +1,14 @@
version: '3'
services:
nacos:
- image: nacos/nacos-server:v2.3.1
+ image: nacos/nacos-server:v2.3.2
hostname: "nacos-standalone"
environment:
- NACOS_AUTH_ENABLE=true
- NACOS_AUTH_CACHE_ENABLE=true
- NACOS_AUTH_IDENTITY_KEY=nacos
- NACOS_AUTH_IDENTITY_VALUE=nacos
+ - NACOS_AUTH_TOKEN= # 请阅读官方文档了解规则后替换为自己的token:https://nacos.io/zh-cn/docs/v2/guide/user/auth.html
- MODE=standalone
- TZ=Asia/Shanghai
volumes:
diff --git a/script/kuboard/kuboard_spring-blade.yaml b/script/kuboard/kuboard_spring-blade.yaml
index 323e165c..fcaaff96 100644
--- a/script/kuboard/kuboard_spring-blade.yaml
+++ b/script/kuboard/kuboard_spring-blade.yaml
@@ -152,7 +152,7 @@ spec:
spec:
containers:
- name: blade-admin
- image: 'swr.cn-east-2.myhuaweicloud.com/blade/blade-admin:4.0.0'
+ image: 'swr.cn-east-2.myhuaweicloud.com/blade/blade-admin:4.1.0'
args:
- '--spring.profiles.active=${PROFILE}'
- '--spring.cloud.nacos.config.server-addr=${NACOS_SERVER_ADDR}'
@@ -386,7 +386,7 @@ spec:
spec:
containers:
- name: blade-auth
- image: 'swr.cn-east-2.myhuaweicloud.com/blade/blade-auth:4.0.0'
+ image: 'swr.cn-east-2.myhuaweicloud.com/blade/blade-auth:4.1.0'
args:
- '--spring.profiles.active=${PROFILE}'
- '--spring.cloud.nacos.config.server-addr=${NACOS_SERVER_ADDR}'
@@ -625,7 +625,7 @@ spec:
spec:
containers:
- name: blade-desk
- image: 'swr.cn-east-2.myhuaweicloud.com/blade/blade-desk:4.0.0'
+ image: 'swr.cn-east-2.myhuaweicloud.com/blade/blade-desk:4.1.0'
args:
- '--spring.profiles.active=${PROFILE}'
- '--spring.cloud.nacos.config.server-addr=${NACOS_SERVER_ADDR}'
@@ -864,7 +864,7 @@ spec:
spec:
containers:
- name: blade-develop
- image: 'swr.cn-east-2.myhuaweicloud.com/blade/blade-develop:4.0.0'
+ image: 'swr.cn-east-2.myhuaweicloud.com/blade/blade-develop:4.1.0'
args:
- '--spring.profiles.active=${PROFILE}'
- '--spring.cloud.nacos.config.server-addr=${NACOS_SERVER_ADDR}'
@@ -1096,7 +1096,7 @@ spec:
spec:
containers:
- name: blade-gateway
- image: 'swr.cn-east-2.myhuaweicloud.com/blade/blade-gateway:4.0.0'
+ image: 'swr.cn-east-2.myhuaweicloud.com/blade/blade-gateway:4.1.0'
args:
- '--spring.profiles.active=${PROFILE}'
- '--spring.cloud.nacos.config.server-addr=${NACOS_SERVER_ADDR}'
@@ -1331,7 +1331,7 @@ spec:
spec:
containers:
- name: blade-log
- image: 'swr.cn-east-2.myhuaweicloud.com/blade/blade-log:4.0.0'
+ image: 'swr.cn-east-2.myhuaweicloud.com/blade/blade-log:4.1.0'
args:
- '--spring.profiles.active=${PROFILE}'
- '--spring.cloud.nacos.config.server-addr=${NACOS_SERVER_ADDR}'
@@ -1565,7 +1565,7 @@ spec:
spec:
containers:
- name: blade-report
- image: 'swr.cn-east-2.myhuaweicloud.com/blade/blade-report:4.0.0'
+ image: 'swr.cn-east-2.myhuaweicloud.com/blade/blade-report:4.1.0'
args:
- '--spring.profiles.active=${PROFILE}'
- '--spring.cloud.nacos.config.server-addr=${NACOS_SERVER_ADDR}'
@@ -1799,7 +1799,7 @@ spec:
spec:
containers:
- name: blade-resource
- image: 'swr.cn-east-2.myhuaweicloud.com/blade/blade-resource:4.0.0'
+ image: 'swr.cn-east-2.myhuaweicloud.com/blade/blade-resource:4.1.0'
args:
- '--spring.profiles.active=${PROFILE}'
- '--spring.cloud.nacos.config.server-addr=${NACOS_SERVER_ADDR}'
@@ -2033,7 +2033,7 @@ spec:
spec:
containers:
- name: blade-system
- image: 'swr.cn-east-2.myhuaweicloud.com/blade/blade-system:4.0.0'
+ image: 'swr.cn-east-2.myhuaweicloud.com/blade/blade-system:4.1.0'
args:
- '--spring.profiles.active=${PROFILE}'
- '--spring.cloud.nacos.config.server-addr=${NACOS_SERVER_ADDR}'
@@ -2267,7 +2267,7 @@ spec:
spec:
containers:
- name: blade-user
- image: 'swr.cn-east-2.myhuaweicloud.com/blade/blade-user:4.0.0'
+ image: 'swr.cn-east-2.myhuaweicloud.com/blade/blade-user:4.1.0'
args:
- '--spring.profiles.active=${PROFILE}'
- '--spring.cloud.nacos.config.server-addr=${NACOS_SERVER_ADDR}'
@@ -2496,7 +2496,7 @@ spec:
spec:
containers:
- name: saber-web
- image: 'swr.cn-east-2.myhuaweicloud.com/blade/saber-web:4.0.0'
+ image: 'swr.cn-east-2.myhuaweicloud.com/blade/saber-web:4.1.0'
ports:
- name: web
containerPort: 80
@@ -2721,7 +2721,7 @@ spec:
spec:
containers:
- name: blade-swagger
- image: 'swr.cn-east-2.myhuaweicloud.com/blade/blade-swagger:4.0.0'
+ image: 'swr.cn-east-2.myhuaweicloud.com/blade/blade-swagger:4.1.0'
args:
- '--spring.profiles.active=${PROFILE}'
- '--spring.cloud.nacos.config.server-addr=${NACOS_SERVER_ADDR}'
@@ -3749,7 +3749,7 @@ spec:
spec:
containers:
- name: mysql
- image: 'swr.cn-east-2.myhuaweicloud.com/blade/saber-db:v4.0.0'
+ image: 'swr.cn-east-2.myhuaweicloud.com/blade/saber-db:v4.1.0'
ports:
- name: mysql
containerPort: 3306