Compare commits

..

8 Commits

Author SHA1 Message Date
曾文豪
ea24bf3479 perf(encrypt):加解密调整 2023-07-05 14:11:01 +08:00
曾文豪
90e504e7fd fix:验签接口调整 2023-07-05 13:58:01 +08:00
曾文豪
5db42f5bc8 publish 1.0.12 2023-07-05 13:55:14 +08:00
曾文豪
37d84e2f36 docs: 文档调整 2023-06-30 10:24:13 +08:00
曾文豪
f59d56be9e docs: 文档调整 2023-06-28 13:04:11 +08:00
曾文豪
7f4871fe19 publish 1.0.10 2023-06-28 13:03:03 +08:00
曾文豪
34e3cb2f09 docs: 文档调整 2023-06-14 09:44:11 +08:00
曾文豪
7c1abb9b97 docs: 文档调整 2023-06-14 09:39:38 +08:00
24 changed files with 86 additions and 86 deletions

BIN
.DS_Store vendored

Binary file not shown.

View File

@@ -1,58 +1,38 @@
## 1.0.9
## 1.0.10
## 新增
> 登录接口,增加验签步骤,可通过**validLoginSign**属性开启或关闭(默认)。
## 修复
> 修复微信、钉钉授权跳转地址错误的bug
- feat(login):登录接口增加验签步骤,可通过**validLoginSign**属性开启或关闭(默认)。
- perf(login):可重写**onSignError**方法自定义验签错误的跳转。
- fix(login)修复微信、钉钉授权跳转地址错误的bug
## 1.0.7
## 新增
> feat(web): 增加uploadFileCustomize方法允许自定义文件存放情况
> feat(database): 增加db/data目录存放初始化数据的sql
## 优化
> perf(login): 增加默认值防止token解析异常
- feat(web): 增加uploadFileCustomize方法允许自定义文件存放情况
- feat(database): 增加db/data目录存放初始化数据的sql
- perf(login): 增加默认值防止token解析异常
## 1.0.6
### 新增
> 1新增 **OperationIgnore** 注解,可以指定接口忽略操作日志的收集。
> 2**OperationLog** 增加 desensitize 属性,用来脱敏指定的字段。
- feat(web):新增 **OperationIgnore** 注解,可以指定接口忽略操作日志的收集。
- feat(web)**OperationLog** 增加 desensitize 属性,用来脱敏指定的字段。
## 1.0.2
### 调整
> 1增加数据库定时备份
> 2增加过期备份的删除操作默认过期时间为7天
> 3调整阿里云短信类方便扩展其他方法。
> 4消息发送接口该body类型为 **JSONObject**
> 5调整消息发送接口和方法不兼容旧版本
- feat(database):增加数据库定时备份;
- feat(database)增加过期备份的删除操作默认过期时间为7天
- perf(message):调整阿里云短信类,方便扩展其他方法。
- perf(message)消息发送接口该body类型为 **JSONObject**
- perf(message):调整消息发送接口和方法(不兼容旧版本)
## 1.0.1
### 调整
fastjson增加配置 **DisableCircularReferenceDetect**,禁用相同的对象写成引用的形式。
- perf(web)fastjson增加配置 **DisableCircularReferenceDetect**,禁用相同的对象写成引用的形式。
## 1.0.0
### 升级
> 1hutool依赖升级:5.8.11 -> 5.8.16
> 2fastjson依赖升级1.2.78 -> 1.2.83
> 3mybatis-plus依赖升级3.5.1 -> 3.5.3
### 调整
> 1**TieshengWebConfigurer** 增加 **configSystemCheck** 方法,可根据情况校验系统配置参数。
- perfhutool依赖升级5.8.11 -> 5.8.16
- perffastjson依赖升级1.2.78 -> 1.2.83
- perfmybatis-plus依赖升级:3.5.1 -> 3.5.3
- perf**TieshengWebConfigurer** 增加 **configSystemCheck** 方法,可根据情况校验系统配置参数。
从该版本开始,仓库地址改为:

20
pom.xml
View File

@@ -6,7 +6,7 @@
<groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-parent</artifactId>
<version>1.0.9</version>
<version>1.0.12</version>
<packaging>pom</packaging>
<name>springboot-parent</name>
<description>杭州铁晟科技有限公司基础依赖</description>
@@ -57,55 +57,55 @@
<dependency>
<groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-database</artifactId>
<version>1.0.9</version>
<version>1.0.12</version>
</dependency>
<dependency>
<groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-login</artifactId>
<version>1.0.9</version>
<version>1.0.12</version>
</dependency>
<dependency>
<groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-web</artifactId>
<version>1.0.9</version>
<version>1.0.12</version>
</dependency>
<dependency>
<groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-util</artifactId>
<version>1.0.9</version>
<version>1.0.12</version>
</dependency>
<dependency>
<groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-platform</artifactId>
<version>1.0.9</version>
<version>1.0.12</version>
</dependency>
<dependency>
<groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-message</artifactId>
<version>1.0.9</version>
<version>1.0.12</version>
</dependency>
<dependency>
<groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-encrypt</artifactId>
<version>1.0.9</version>
<version>1.0.12</version>
</dependency>
<dependency>
<groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-annotation</artifactId>
<version>1.0.9</version>
<version>1.0.12</version>
</dependency>
<dependency>
<groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-poi</artifactId>
<version>1.0.9</version>
<version>1.0.12</version>
</dependency>
<dependency>

View File

@@ -6,11 +6,11 @@
<parent>
<groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-parent</artifactId>
<version>1.0.9</version>
<version>1.0.12</version>
</parent>
<artifactId>springboot-ademo</artifactId>
<version>1.0.0</version>
<version>1.1.0</version>
<properties>
<maven.compiler.source>8</maven.compiler.source>

View File

@@ -3,7 +3,6 @@ package com.tiesheng.demo;
import com.tiesheng.core.EnableTieshengWeb;
import com.tiesheng.demo.config.DemoWebConfigurer;
import com.tiesheng.encrypt.EnableEncryptConfig;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.transaction.annotation.EnableTransactionManagement;

View File

@@ -6,7 +6,7 @@
<parent>
<groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-parent</artifactId>
<version>1.0.9</version>
<version>1.0.12</version>
</parent>
<artifactId>springboot-annotation</artifactId>

View File

@@ -6,7 +6,7 @@
<parent>
<groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-parent</artifactId>
<version>1.0.9</version>
<version>1.0.12</version>
</parent>
<artifactId>springboot-database</artifactId>

View File

@@ -6,7 +6,7 @@
<parent>
<groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-parent</artifactId>
<version>1.0.9</version>
<version>1.0.12</version>
</parent>
<artifactId>springboot-encrypt</artifactId>

View File

@@ -1,21 +0,0 @@
package com.tiesheng.encrypt;
import com.tiesheng.encrypt.config.DecryptRequestBodyAdvice;
import com.tiesheng.encrypt.config.EncryptResponseBodyAdvice;
import org.springframework.context.annotation.Import;
import java.lang.annotation.*;
/**
* @author hao
*/
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.TYPE})
@Documented
@Import({
DecryptRequestBodyAdvice.class,
EncryptResponseBodyAdvice.class,
})
public @interface EnableEncryptConfig {
}

View File

@@ -0,0 +1,10 @@
package com.tiesheng.encrypt;
import org.springframework.context.annotation.ComponentScan;
@ComponentScan({
"com.tiesheng.encrypt.**.*",
})
public class EncryptAutoConfigurer {
}

View File

@@ -37,7 +37,7 @@ public class EncryptResponseBodyAdvice implements ResponseBodyAdvice<ApiResp> {
try {
Object data = body.getData();
if (data == null || !body.successful()) {
if (data == null || !body.successful() || !encryptConfig.isBody()) {
return body;
}

View File

@@ -6,7 +6,7 @@
<parent>
<groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-parent</artifactId>
<version>1.0.9</version>
<version>1.0.12</version>
</parent>
<artifactId>springboot-login</artifactId>

View File

@@ -21,7 +21,6 @@ import com.tiesheng.platform.config.wxmp.PlatformWxmpConfig;
import com.tiesheng.platform.config.wxmp.bean.WxConfigBean;
import com.tiesheng.platform.config.wxmp.bean.WxJsapiSignature;
import com.tiesheng.platform.config.wxmp.bean.WxUserInfo;
import com.tiesheng.util.ServletKit;
import com.tiesheng.util.config.GlobalConfig;
import com.tiesheng.util.exception.ApiException;
import com.tiesheng.util.pojos.ApiResp;
@@ -65,7 +64,7 @@ public class LoginController {
@OperationIgnore
public void uniqueIndex(UniqueIndexDTO dto, HttpServletResponse response) {
if (tsTokenConfig.isValidLoginSign() && !dto.validSign()) {
ServletKit.write(response, "404", "text");
tieshengLoginConfigurer.onSignError(response);
return;
}

View File

@@ -2,6 +2,7 @@ package com.tiesheng.login.service;
import com.tiesheng.login.config.token.bean.TokenBean;
import com.tiesheng.login.pojos.DoLoginInfo;
import com.tiesheng.util.ServletKit;
import org.springframework.context.annotation.Configuration;
import javax.servlet.http.HttpServletResponse;
@@ -28,4 +29,9 @@ public interface TieshengLoginConfigurer {
void onLoginRedirect(TokenBean bean, String to, String extra, HttpServletResponse response);
/**
* 签名错误的时候
*/
void onSignError(HttpServletResponse response);
}

View File

@@ -24,4 +24,9 @@ public class DefaultLoginConfigurer implements TieshengLoginConfigurer {
public void onLoginRedirect(TokenBean bean, String to, String extra, HttpServletResponse response) {
}
@Override
public void onSignError(HttpServletResponse response) {
}
}

View File

@@ -6,7 +6,7 @@
<parent>
<groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-parent</artifactId>
<version>1.0.9</version>
<version>1.0.12</version>
</parent>
<artifactId>springboot-message</artifactId>

View File

@@ -6,7 +6,7 @@
<parent>
<groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-parent</artifactId>
<version>1.0.9</version>
<version>1.0.12</version>
</parent>
<artifactId>springboot-platform</artifactId>

View File

@@ -6,7 +6,7 @@
<parent>
<groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-parent</artifactId>
<version>1.0.9</version>
<version>1.0.12</version>
</parent>
<artifactId>springboot-poi</artifactId>

View File

@@ -6,7 +6,7 @@
<parent>
<groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-parent</artifactId>
<version>1.0.9</version>
<version>1.0.12</version>
</parent>
<artifactId>springboot-util</artifactId>

View File

@@ -30,6 +30,7 @@ public class EncryptConfig {
*/
private String key = "WmdUzPJXbngVNiaSsQrihg==";
private Integer saltSize = 8;
private boolean body = false;
public EncryptConfig() {
sm4 = SmUtil.sm4(Base64.decode(getKey()));
@@ -133,4 +134,12 @@ public class EncryptConfig {
public void setSaltSize(Integer saltSize) {
this.saltSize = saltSize;
}
public boolean isBody() {
return body;
}
public void setBody(boolean body) {
this.body = body;
}
}

View File

@@ -6,7 +6,7 @@
<parent>
<groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-parent</artifactId>
<version>1.0.9</version>
<version>1.0.12</version>
</parent>
<artifactId>springboot-web</artifactId>

View File

@@ -2,6 +2,7 @@ package com.tiesheng.core;
import com.tiesheng.core.service.TieshengWebConfigurer;
import com.tiesheng.database.DatabaseAutoConfigurer;
import com.tiesheng.encrypt.EncryptAutoConfigurer;
import com.tiesheng.login.LoginAutoConfigurer;
import com.tiesheng.message.MessageAutoConfigurer;
import com.tiesheng.util.UtilAutoConfigurer;
@@ -20,7 +21,8 @@ import java.lang.annotation.*;
MessageAutoConfigurer.class,
CoreAutoConfigurer.class,
LoginAutoConfigurer.class,
DatabaseAutoConfigurer.class
DatabaseAutoConfigurer.class,
EncryptAutoConfigurer.class
})
public @interface EnableTieshengWeb {

View File

@@ -48,6 +48,10 @@ public class CorePlatformUniqueService extends TsServiceBase<CorePlatformUniqueM
tieshengWebConfigurer.redirect(bean, to, extra, response);
}
@Override
public void onSignError(HttpServletResponse response) {
tieshengWebConfigurer.onSignError(response);
}
/**
* 更新用户id

View File

@@ -5,6 +5,7 @@ import com.tiesheng.core.pojos.RequestUserInfo;
import com.tiesheng.core.pojos.dao.CoreConfigSystem;
import com.tiesheng.core.pojos.dao.CorePlatformUnique;
import com.tiesheng.login.config.token.bean.TokenBean;
import com.tiesheng.util.ServletKit;
import com.tiesheng.util.exception.ApiRespEnum;
import com.tiesheng.util.pojos.ApiResp;
import org.springframework.web.multipart.MultipartFile;
@@ -91,5 +92,11 @@ public interface TieshengWebConfigurer {
*/
void redirect(TokenBean bean, String to, String extra, HttpServletResponse response);
/**
* 签名错误的时候
*/
default void onSignError(HttpServletResponse response) {
ServletKit.write(response, "404", "text");
}
}