publish zjut-1.1.3

This commit is contained in:
曾文豪
2025-12-29 17:45:59 +08:00
parent 88bc553213
commit 345d99e6a9
12 changed files with 38 additions and 28 deletions

20
pom.xml
View File

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

View File

@@ -6,11 +6,11 @@
<parent> <parent>
<groupId>com.tiesheng.springboot-parent</groupId> <groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-parent</artifactId> <artifactId>springboot-parent</artifactId>
<version>1.1.2</version> <version>zjut-1.1.3</version>
</parent> </parent>
<artifactId>springboot-ademo</artifactId> <artifactId>springboot-ademo</artifactId>
<version>1.1.2</version> <version>zjut-1.1.3</version>
<properties> <properties>
<maven.compiler.source>8</maven.compiler.source> <maven.compiler.source>8</maven.compiler.source>

View File

@@ -6,7 +6,7 @@
<parent> <parent>
<groupId>com.tiesheng.springboot-parent</groupId> <groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-parent</artifactId> <artifactId>springboot-parent</artifactId>
<version>1.1.2</version> <version>zjut-1.1.3</version>
</parent> </parent>
<artifactId>springboot-annotation</artifactId> <artifactId>springboot-annotation</artifactId>

View File

@@ -6,7 +6,7 @@
<parent> <parent>
<groupId>com.tiesheng.springboot-parent</groupId> <groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-parent</artifactId> <artifactId>springboot-parent</artifactId>
<version>1.1.2</version> <version>zjut-1.1.3</version>
</parent> </parent>
<artifactId>springboot-database</artifactId> <artifactId>springboot-database</artifactId>

View File

@@ -6,7 +6,7 @@
<parent> <parent>
<groupId>com.tiesheng.springboot-parent</groupId> <groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-parent</artifactId> <artifactId>springboot-parent</artifactId>
<version>1.1.2</version> <version>zjut-1.1.3</version>
</parent> </parent>
<artifactId>springboot-encrypt</artifactId> <artifactId>springboot-encrypt</artifactId>

View File

@@ -6,7 +6,7 @@
<parent> <parent>
<groupId>com.tiesheng.springboot-parent</groupId> <groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-parent</artifactId> <artifactId>springboot-parent</artifactId>
<version>1.1.2</version> <version>zjut-1.1.3</version>
</parent> </parent>
<artifactId>springboot-login</artifactId> <artifactId>springboot-login</artifactId>

View File

@@ -6,7 +6,7 @@
<parent> <parent>
<groupId>com.tiesheng.springboot-parent</groupId> <groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-parent</artifactId> <artifactId>springboot-parent</artifactId>
<version>1.1.2</version> <version>zjut-1.1.3</version>
</parent> </parent>
<artifactId>springboot-message</artifactId> <artifactId>springboot-message</artifactId>

View File

@@ -6,7 +6,7 @@
<parent> <parent>
<groupId>com.tiesheng.springboot-parent</groupId> <groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-parent</artifactId> <artifactId>springboot-parent</artifactId>
<version>1.1.2</version> <version>zjut-1.1.3</version>
</parent> </parent>
<artifactId>springboot-platform</artifactId> <artifactId>springboot-platform</artifactId>

View File

@@ -6,7 +6,7 @@
<parent> <parent>
<groupId>com.tiesheng.springboot-parent</groupId> <groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-parent</artifactId> <artifactId>springboot-parent</artifactId>
<version>1.1.2</version> <version>zjut-1.1.3</version>
</parent> </parent>
<artifactId>springboot-poi</artifactId> <artifactId>springboot-poi</artifactId>

View File

@@ -6,7 +6,7 @@
<parent> <parent>
<groupId>com.tiesheng.springboot-parent</groupId> <groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-parent</artifactId> <artifactId>springboot-parent</artifactId>
<version>1.1.2</version> <version>zjut-1.1.3</version>
</parent> </parent>
<artifactId>springboot-util</artifactId> <artifactId>springboot-util</artifactId>

View File

@@ -23,17 +23,26 @@ public class EncryptConfig {
/** /**
* 加解密对象 * 加解密对象
*/ */
private final SM4 sm4; private static SM4 sm4;
/** /**
* 加密密钥 * 加密密钥
*/ */
private String key = "WmdUzPJXbngVNiaSsQrihg=="; private String key = "Z1mn6fKe6ubnm5762KR3Cg==";
private Integer saltSize = 8; private Integer saltSize = 8;
private boolean body = false; private boolean body = false;
public EncryptConfig() {
sm4 = SmUtil.sm4(Base64.decode(getKey())); /**
* 获取SM4对象
*
* @return
*/
private SM4 getSm4() {
if (sm4 == null) {
sm4 = SmUtil.sm4(Base64.decode(getKey()));
}
return sm4;
} }
/** /**
@@ -46,7 +55,7 @@ public class EncryptConfig {
if (StrUtil.isEmpty(content)) { if (StrUtil.isEmpty(content)) {
return ""; return "";
} }
return sm4.encryptBase64(content); return getSm4().encryptBase64(content);
} }
@@ -58,7 +67,7 @@ public class EncryptConfig {
*/ */
public String decrypt(String base64) { public String decrypt(String base64) {
try { try {
return sm4.decryptStr(base64); return getSm4().decryptStr(base64);
} catch (Exception ignore) { } catch (Exception ignore) {
} }
return base64; return base64;
@@ -117,7 +126,8 @@ public class EncryptConfig {
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// setter\getter // setter\getter
///////////////////////////////////////////////////////////////////////////
/// ////////////////////////////////////////////////////////////////////////
public String getKey() { public String getKey() {
return key; return key;

View File

@@ -6,7 +6,7 @@
<parent> <parent>
<groupId>com.tiesheng.springboot-parent</groupId> <groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-parent</artifactId> <artifactId>springboot-parent</artifactId>
<version>1.1.2</version> <version>zjut-1.1.3</version>
</parent> </parent>
<artifactId>springboot-web</artifactId> <artifactId>springboot-web</artifactId>