Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ea24bf3479 | ||
|
|
90e504e7fd | ||
|
|
5db42f5bc8 | ||
|
|
37d84e2f36 | ||
|
|
f59d56be9e | ||
|
|
7f4871fe19 | ||
|
|
34e3cb2f09 | ||
|
|
7c1abb9b97 |
58
CHANGELOG.md
58
CHANGELOG.md
@@ -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
|
||||
|
||||
### 升级
|
||||
|
||||
> 1,hutool依赖升级:5.8.11 -> 5.8.16
|
||||
> 2,fastjson依赖升级:1.2.78 -> 1.2.83
|
||||
> 3,mybatis-plus依赖升级:3.5.1 -> 3.5.3
|
||||
|
||||
### 调整
|
||||
|
||||
> 1,**TieshengWebConfigurer** 增加 **configSystemCheck** 方法,可根据情况校验系统配置参数。
|
||||
- perf:hutool依赖升级:5.8.11 -> 5.8.16
|
||||
- perf:fastjson依赖升级:1.2.78 -> 1.2.83
|
||||
- perf:mybatis-plus依赖升级:3.5.1 -> 3.5.3
|
||||
- perf:**TieshengWebConfigurer** 增加 **configSystemCheck** 方法,可根据情况校验系统配置参数。
|
||||
|
||||
从该版本开始,仓库地址改为:
|
||||
|
||||
|
||||
20
pom.xml
20
pom.xml
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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 {
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
package com.tiesheng.encrypt;
|
||||
|
||||
|
||||
import org.springframework.context.annotation.ComponentScan;
|
||||
|
||||
@ComponentScan({
|
||||
"com.tiesheng.encrypt.**.*",
|
||||
})
|
||||
public class EncryptAutoConfigurer {
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
}
|
||||
|
||||
@@ -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) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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 {
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user