mirror of
https://gitee.com/xiaonuobase/snowy.git
synced 2026-10-06 06:52:58 +08:00
【升级】加密私钥进行字节化避免代码出现明文其次升级trans翻译组件
This commit is contained in:
@@ -66,10 +66,38 @@ gitcode下载地址:[https://gitcode.com/xiaonuobase/Snowy](https://gitcode.co
|
||||
|
||||
- 如果开源版本不能满足您的需求,还可以看看我们官方推出的基于开源版开发的商业化产品
|
||||
|
||||
| 产品名称 | 演示 | 用途 |
|
||||
|-------------|------------------------------------------------------|---------------------------------|
|
||||
| AI智能化零代码开发平台 | [https://alsc.xiaonuo.vip](https://alsc.xiaonuo.vip) | AI智能驱动,拖拉拽即可搭建业务系统,无需编写一行代码 |
|
||||
| 国产数据中台 | [https://data.xiaonuo.vip](https://data.xiaonuo.vip) | 覆盖数据采集、存储、治理、安全、资产化、服务全流程的一站式数据管理平台 |
|
||||
<table>
|
||||
<colgroup>
|
||||
<col style="width: 25%"/>
|
||||
<col style="width: 20%"/>
|
||||
<col style="width: 55%"/>
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr><th>产品名称</th><th>演示</th><th>用途</th></tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>AI智能化零代码开发平台</td>
|
||||
<td><a href="https://alsc.xiaonuo.vip">https://alsc.xiaonuo.vip</a></td>
|
||||
<td>AI智能驱动,拖拉拽即可搭建业务系统,无需编写一行代码。</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>国产数据中台</td>
|
||||
<td><a href="https://data.xiaonuo.vip">https://data.xiaonuo.vip</a></td>
|
||||
<td>覆盖数据采集、存储、治理、安全、资产化、服务全流程的一站式数据管理平台。</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>统一身份认证平台</td>
|
||||
<td><a href="https://iam.xnark.com">https://iam.xnark.com</a></td>
|
||||
<td>一款企业级统一身份认证平台,全面支持 OAuth、SAML、JWT、CAS 等主流协议,既可作为 IDP 构建企业统一认证中心,也可作为 SP 对接第三方身份源,一个平台统管身份认证、单点登录与权限体系。</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>AI大模型平台</td>
|
||||
<td><a href="https://ai.xnark.com">https://ai.xnark.com</a></td>
|
||||
<td>一站式企业级AI应用平台,覆盖从大模型接入、智能体搭建、知识库管理到应用发布的全链路,让企业零门槛构建和运营自己的AI能力。</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
## 快速启动
|
||||
|
||||
@@ -287,13 +315,13 @@ QQ技术群:732230670(已满)、685395081
|
||||
|
||||
## 团队成员
|
||||
|
||||
| 成员 | 技术 | 昵称 |
|
||||
|:---:|:--:|:-----:|
|
||||
| 俞宝山 | 全栈 | 俞宝山 |
|
||||
| 徐玉祥 | 全栈 | 就是那个锅 |
|
||||
| 董夏雨 | 全栈 | 阿董 |
|
||||
| 王鹏 | 全栈 | 每天一点 |
|
||||
| 陈心雨 | 前端 | . |
|
||||
| 成员 | 技术 | 昵称 |
|
||||
|:---:|:--:|:-----:|
|
||||
| 俞宝山 | 全栈 | 俞宝山 |
|
||||
| 徐玉祥 | 全栈 | 就是那个锅 |
|
||||
| 董夏雨 | 全栈 | 阿董 |
|
||||
| 王鹏 | 全栈 | 每天一点 |
|
||||
| 陈心雨 | 前端 | . |
|
||||
|
||||
## 曾获荣誉
|
||||
|
||||
|
||||
@@ -177,16 +177,16 @@
|
||||
|
||||
<!-- easy-trans -->
|
||||
<dependency>
|
||||
<groupId>com.fhs-opensource</groupId>
|
||||
<groupId>org.dromara</groupId>
|
||||
<artifactId>easy-trans-spring-boot-starter</artifactId>
|
||||
<version>3.0.0</version>
|
||||
<version>3.1.4</version>
|
||||
</dependency>
|
||||
|
||||
<!-- easy-trans-mybatis-plus-extend -->
|
||||
<dependency>
|
||||
<groupId>com.fhs-opensource</groupId>
|
||||
<groupId>org.dromara</groupId>
|
||||
<artifactId>easy-trans-mybatis-plus-extend</artifactId>
|
||||
<version>3.0.0</version>
|
||||
<version>3.1.4</version>
|
||||
</dependency>
|
||||
|
||||
<!-- redis -->
|
||||
|
||||
@@ -72,13 +72,13 @@
|
||||
|
||||
<!-- easy-trans -->
|
||||
<dependency>
|
||||
<groupId>com.fhs-opensource</groupId>
|
||||
<groupId>org.dromara</groupId>
|
||||
<artifactId>easy-trans-spring-boot-starter</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- easy-trans-mybatis-plus-extend -->
|
||||
<dependency>
|
||||
<groupId>com.fhs-opensource</groupId>
|
||||
<groupId>org.dromara</groupId>
|
||||
<artifactId>easy-trans-mybatis-plus-extend</artifactId>
|
||||
</dependency>
|
||||
|
||||
|
||||
@@ -16,9 +16,9 @@ import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.fhs.core.trans.anno.Trans;
|
||||
import com.fhs.core.trans.constant.TransType;
|
||||
import com.fhs.core.trans.vo.TransPojo;
|
||||
import org.dromara.core.trans.anno.Trans;
|
||||
import org.dromara.core.trans.constant.TransType;
|
||||
import org.dromara.core.trans.vo.TransPojo;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
@@ -27,6 +27,9 @@ import lombok.extern.slf4j.Slf4j;
|
||||
* 使用小伙伴需要过等保密评相关,请在此处更改为自己的加密方法,或加密机,使用加密机同时需要替换公钥,私钥在内部无法导出,提供加密的方法
|
||||
* 如果不涉及到加密机方面的内容,请更改公私要为自己重新生成的,生成方式请看集成的sm-crypto主页
|
||||
*
|
||||
* 密钥已通过 CommonKeyUtil 进行混淆存储,防止反编译直接获取明文
|
||||
* 如需重新生成密钥对,调用 CommonKeyUtil.generateSm2KeyPair() 方法,将输出的混淆代码替换下方对应数组即可
|
||||
*
|
||||
* @author yubaoshan
|
||||
* @date 2022/9/15 21:51
|
||||
*/
|
||||
@@ -36,11 +39,61 @@ public class CommonCryptogramUtil {
|
||||
/** 公钥 */
|
||||
private static final String PUBLIC_KEY = "04298364ec840088475eae92a591e01284d1abefcda348b47eb324bb521bb03b0b2a5bc393f6b71dabb8f15c99a0050818b56b23f31743b93df9cf8948f15ddb54";
|
||||
|
||||
/** 私钥 */
|
||||
private static final String PRIVATE_KEY = "3037723d47292171677ec8bd7dc9af696c7472bc5f251b2cec07e65fdef22e25";
|
||||
/** 私钥混淆后的密文数据,运行时通过XOR还原,防止反编译直接获取明文,更换密钥请运行CommonKeyUtil.main() */
|
||||
private static final byte[] PRIVATE_KEY_DATA = {
|
||||
(byte)0x32, (byte)0x10, (byte)0xA6, (byte)0xC8, (byte)0xAB, (byte)0x84, (byte)0xFD, (byte)0x19, (byte)0x1D, (byte)0xDE,
|
||||
(byte)0x51, (byte)0xE9, (byte)0x48, (byte)0x71, (byte)0xA5, (byte)0x27, (byte)0x26, (byte)0x62, (byte)0x25, (byte)0x6B,
|
||||
(byte)0xE6, (byte)0x12, (byte)0x52, (byte)0x27, (byte)0x52, (byte)0x14, (byte)0x66, (byte)0xFC, (byte)0x63, (byte)0xA2,
|
||||
(byte)0x43, (byte)0xB0, (byte)0x1F, (byte)0xB7, (byte)0x9E, (byte)0xFE, (byte)0x0E, (byte)0xA6, (byte)0x84, (byte)0xE8,
|
||||
(byte)0x61, (byte)0x63, (byte)0xFB, (byte)0xCB, (byte)0x50, (byte)0x6B, (byte)0xFF, (byte)0x79, (byte)0x48, (byte)0xBF,
|
||||
(byte)0x2E, (byte)0x3E, (byte)0x9D, (byte)0x9F, (byte)0xD8, (byte)0x6E, (byte)0xE8, (byte)0x33, (byte)0x70, (byte)0x45,
|
||||
(byte)0xC6, (byte)0x9C, (byte)0x76, (byte)0x8D
|
||||
};
|
||||
/** 私钥混淆掩码,与PRIVATE_KEY_DATA逐字节XOR可还原出私钥明文 */
|
||||
private static final byte[] PRIVATE_KEY_MASK = {
|
||||
(byte)0x01, (byte)0x20, (byte)0x95, (byte)0xFF, (byte)0x9C, (byte)0xB6, (byte)0xCE, (byte)0x7D, (byte)0x29, (byte)0xE9,
|
||||
(byte)0x63, (byte)0xD0, (byte)0x7A, (byte)0x40, (byte)0x92, (byte)0x16, (byte)0x10, (byte)0x55, (byte)0x12, (byte)0x0E,
|
||||
(byte)0x85, (byte)0x2A, (byte)0x30, (byte)0x43, (byte)0x65, (byte)0x70, (byte)0x05, (byte)0xC5, (byte)0x02, (byte)0xC4,
|
||||
(byte)0x75, (byte)0x89, (byte)0x29, (byte)0xD4, (byte)0xA9, (byte)0xCA, (byte)0x39, (byte)0x94, (byte)0xE6, (byte)0x8B,
|
||||
(byte)0x54, (byte)0x05, (byte)0xC9, (byte)0xFE, (byte)0x61, (byte)0x09, (byte)0xCD, (byte)0x1A, (byte)0x2D, (byte)0xDC,
|
||||
(byte)0x1E, (byte)0x09, (byte)0xF8, (byte)0xA9, (byte)0xED, (byte)0x08, (byte)0x8C, (byte)0x56, (byte)0x16, (byte)0x77,
|
||||
(byte)0xF4, (byte)0xF9, (byte)0x44, (byte)0xB8
|
||||
};
|
||||
|
||||
/** SM4的对称秘钥(生产环境需要改成自己使用的) 16 进制字符串,要求为 128 比特 */
|
||||
private static final String KEY = "0123456789abcdeffedcba9876543210";
|
||||
/** SM4对称密钥混淆后的密文数据(生产环境需要改成自己的,运行CommonKeyUtil.main()生成) */
|
||||
private static final byte[] SM4_KEY_DATA = {
|
||||
(byte)0x51, (byte)0x99, (byte)0x90, (byte)0x06, (byte)0x38, (byte)0x18, (byte)0xB4, (byte)0x8C, (byte)0x1D, (byte)0xE4,
|
||||
(byte)0x8C, (byte)0x2E, (byte)0x35, (byte)0x6E, (byte)0x1F, (byte)0xDD, (byte)0x96, (byte)0xF5, (byte)0x8D, (byte)0x1E,
|
||||
(byte)0x5A, (byte)0xB9, (byte)0x70, (byte)0xB0, (byte)0xDD, (byte)0xEC, (byte)0x01, (byte)0x2C, (byte)0xBF, (byte)0x46,
|
||||
(byte)0x2D, (byte)0x9D
|
||||
};
|
||||
/** SM4对称密钥混淆掩码,与SM4_KEY_DATA逐字节XOR可还原出密钥明文 */
|
||||
private static final byte[] SM4_KEY_MASK = {
|
||||
(byte)0x61, (byte)0xA8, (byte)0xA2, (byte)0x35, (byte)0x0C, (byte)0x2D, (byte)0x82, (byte)0xBB, (byte)0x25, (byte)0xDD,
|
||||
(byte)0xED, (byte)0x4C, (byte)0x56, (byte)0x0A, (byte)0x7A, (byte)0xBB, (byte)0xF0, (byte)0x90, (byte)0xE9, (byte)0x7D,
|
||||
(byte)0x38, (byte)0xD8, (byte)0x49, (byte)0x88, (byte)0xEA, (byte)0xDA, (byte)0x34, (byte)0x18, (byte)0x8C, (byte)0x74,
|
||||
(byte)0x1C, (byte)0xAD
|
||||
};
|
||||
|
||||
/** SM4初始化向量IV混淆后的密文数据 */
|
||||
private static final byte[] SM4_IV_DATA = {
|
||||
(byte)0x1C, (byte)0xDB, (byte)0x85, (byte)0x32, (byte)0x42, (byte)0x38, (byte)0x33, (byte)0x1A, (byte)0x79, (byte)0x2B,
|
||||
(byte)0xB9, (byte)0xB3, (byte)0x30, (byte)0x92, (byte)0xCA, (byte)0xB7, (byte)0x51, (byte)0xE8, (byte)0xE1, (byte)0x89,
|
||||
(byte)0x0E, (byte)0xCA, (byte)0x9A, (byte)0x86, (byte)0x28, (byte)0xBB, (byte)0x78, (byte)0x75, (byte)0x5D, (byte)0x0B,
|
||||
(byte)0x84, (byte)0x02
|
||||
};
|
||||
/** SM4初始化向量IV混淆掩码,与SM4_IV_DATA逐字节XOR可还原出IV明文 */
|
||||
private static final byte[] SM4_IV_MASK = {
|
||||
(byte)0x7A, (byte)0xBE, (byte)0xE1, (byte)0x51, (byte)0x20, (byte)0x59, (byte)0x0A, (byte)0x22, (byte)0x4E, (byte)0x1D,
|
||||
(byte)0x8C, (byte)0x87, (byte)0x03, (byte)0xA0, (byte)0xFB, (byte)0x87, (byte)0x61, (byte)0xD9, (byte)0xD3, (byte)0xBA,
|
||||
(byte)0x3A, (byte)0xFF, (byte)0xAC, (byte)0xB1, (byte)0x10, (byte)0x82, (byte)0x19, (byte)0x17, (byte)0x3E, (byte)0x6F,
|
||||
(byte)0xE1, (byte)0x64
|
||||
};
|
||||
|
||||
/** 运行时还原的密钥 */
|
||||
private static final String PRIVATE_KEY = CommonKeyUtil.reconstruct(PRIVATE_KEY_DATA, PRIVATE_KEY_MASK);
|
||||
private static final String KEY = CommonKeyUtil.reconstruct(SM4_KEY_DATA, SM4_KEY_MASK);
|
||||
private static final String IV = CommonKeyUtil.reconstruct(SM4_IV_DATA, SM4_IV_MASK);
|
||||
|
||||
/** Hutool SM2 对象 */
|
||||
private static final SM2 sm2 = SmUtil.sm2(HexUtil.decodeHex(PRIVATE_KEY), HexUtil.decodeHex(PUBLIC_KEY));
|
||||
@@ -92,7 +145,7 @@ public class CommonCryptogramUtil {
|
||||
// SM4 加密 cbc模式
|
||||
Sm4Options sm4Options4 = new Sm4Options();
|
||||
sm4Options4.setMode("cbc");
|
||||
sm4Options4.setIv("fedcba98765432100123456789abcdef");
|
||||
sm4Options4.setIv(IV);
|
||||
return Sm4.encrypt(str, KEY, sm4Options4);
|
||||
}
|
||||
|
||||
@@ -109,7 +162,7 @@ public class CommonCryptogramUtil {
|
||||
// 解密,cbc 模式,输出 utf8 字符串
|
||||
Sm4Options sm4Options8 = new Sm4Options();
|
||||
sm4Options8.setMode("cbc");
|
||||
sm4Options8.setIv("fedcba98765432100123456789abcdef");
|
||||
sm4Options8.setIv(IV);
|
||||
String docString = Sm4.decrypt(str, KEY, sm4Options8);
|
||||
if ("".equals(docString)) {
|
||||
log.warn(">>> 字段解密失败,返回原文值:{}", str);
|
||||
|
||||
@@ -0,0 +1,152 @@
|
||||
/*
|
||||
* Copyright [2022] [https://www.xiaonuo.vip]
|
||||
*
|
||||
* Snowy采用APACHE LICENSE 2.0开源协议,您在使用过程中,需要注意以下几点:
|
||||
*
|
||||
* 1.请不要删除和修改根目录下的LICENSE文件。
|
||||
* 2.请不要删除和修改Snowy源码头部的版权声明。
|
||||
* 3.本项目代码可免费商业使用,商业使用请保留源码和相关描述文件的项目出处,作者声明等。
|
||||
* 4.分发源码时候,请注明软件出处 https://www.xiaonuo.vip
|
||||
* 5.不可二次分发开源参与同类竞品,如有想法可联系团队xiaonuobase@qq.com商议合作。
|
||||
* 6.若您的项目无法满足以上几点,需要更多功能代码,获取Snowy商业授权许可,请在官网购买授权,地址为 https://www.xiaonuo.vip
|
||||
*/
|
||||
package vip.xiaonuo.common.util;
|
||||
|
||||
import cn.hutool.core.util.HexUtil;
|
||||
import cn.hutool.crypto.SmUtil;
|
||||
import cn.hutool.crypto.asymmetric.SM2;
|
||||
import org.bouncycastle.jcajce.provider.asymmetric.ec.BCECPrivateKey;
|
||||
import org.bouncycastle.jcajce.provider.asymmetric.ec.BCECPublicKey;
|
||||
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.security.SecureRandom;
|
||||
|
||||
/**
|
||||
* 密钥保护工具类,提供以下能力:
|
||||
* 1. 密钥混淆存储:通过XOR+随机掩码将密钥打散为字节数组,防止反编译直接获取明文
|
||||
* 2. 运行时还原:将混淆后的字节数组还原为原始密钥
|
||||
* 3. SM2密钥对生成:生成新的SM2公私钥对,并输出混淆后的Java代码
|
||||
*
|
||||
* @author yubaoshan
|
||||
* @date 2022/9/15 21:51
|
||||
*/
|
||||
public class CommonKeyUtil {
|
||||
|
||||
/**
|
||||
* 运行时还原密钥(XOR解混淆)
|
||||
*
|
||||
* @param data 混淆后的数据字节数组
|
||||
* @param mask 混淆掩码字节数组
|
||||
* @return 还原后的密钥字符串
|
||||
*/
|
||||
public static String reconstruct(byte[] data, byte[] mask) {
|
||||
byte[] result = new byte[data.length];
|
||||
for (int i = 0; i < data.length; i++) {
|
||||
result[i] = (byte) (data[i] ^ mask[i]);
|
||||
}
|
||||
return new String(result, StandardCharsets.UTF_8);
|
||||
}
|
||||
|
||||
/**
|
||||
* 生成SM2密钥对,打印公私钥十六进制字符串及对应的混淆代码
|
||||
* 生成后将混淆代码替换到 CommonCryptogramUtil 中即可
|
||||
*/
|
||||
public static void generateSm2KeyPair() {
|
||||
SM2 sm2 = SmUtil.sm2();
|
||||
BCECPublicKey publicKey = (BCECPublicKey) sm2.getPublicKey();
|
||||
BCECPrivateKey privateKey = (BCECPrivateKey) sm2.getPrivateKey();
|
||||
String pubHex = HexUtil.encodeHexStr(publicKey.getQ().getEncoded(false));
|
||||
String priHex = privateKey.getD().toString(16);
|
||||
System.out.println("========== SM2 密钥对 ==========");
|
||||
System.out.println("公钥: " + pubHex);
|
||||
System.out.println("私钥: " + priHex);
|
||||
System.out.println("================================");
|
||||
System.out.println();
|
||||
System.out.println("--- 公钥(明文,直接替换 PUBLIC_KEY 的值)---");
|
||||
System.out.println("private static final String PUBLIC_KEY = \"" + pubHex + "\";");
|
||||
System.out.println();
|
||||
System.out.println("--- 私钥混淆代码(替换 PRIVATE_KEY_DATA 和 PRIVATE_KEY_MASK)---");
|
||||
printObfuscatedCode("PRIVATE_KEY", priHex);
|
||||
}
|
||||
|
||||
/**
|
||||
* 将密钥进行混淆处理,输出可直接嵌入Java源码的混淆字节数组定义
|
||||
*
|
||||
* @param name 变量名前缀
|
||||
* @param key 十六进制密钥字符串
|
||||
*/
|
||||
public static void printObfuscatedCode(String name, String key) {
|
||||
byte[] keyBytes = key.getBytes(StandardCharsets.UTF_8);
|
||||
byte[] mask = new byte[keyBytes.length];
|
||||
new SecureRandom().nextBytes(mask);
|
||||
byte[] data = new byte[keyBytes.length];
|
||||
for (int i = 0; i < keyBytes.length; i++) {
|
||||
data[i] = (byte) (keyBytes[i] ^ mask[i]);
|
||||
}
|
||||
System.out.println("private static final byte[] " + name + "_DATA = {");
|
||||
printByteArray(data);
|
||||
System.out.println("};");
|
||||
System.out.println("private static final byte[] " + name + "_MASK = {");
|
||||
printByteArray(mask);
|
||||
System.out.println("};");
|
||||
}
|
||||
|
||||
private static void printByteArray(byte[] arr) {
|
||||
StringBuilder sb = new StringBuilder(" ");
|
||||
for (int i = 0; i < arr.length; i++) {
|
||||
sb.append(String.format("(byte)0x%02X", arr[i] & 0xFF));
|
||||
if (i < arr.length - 1) {
|
||||
sb.append(", ");
|
||||
if ((i + 1) % 10 == 0) {
|
||||
sb.append("\n ");
|
||||
}
|
||||
}
|
||||
}
|
||||
System.out.println(sb);
|
||||
}
|
||||
|
||||
/**
|
||||
* 生成SM4对称密钥(128位,16进制字符串)和IV向量,并输出混淆代码
|
||||
*/
|
||||
public static void generateSm4Key() {
|
||||
byte[] keyBytes = new byte[16];
|
||||
byte[] ivBytes = new byte[16];
|
||||
new SecureRandom().nextBytes(keyBytes);
|
||||
new SecureRandom().nextBytes(ivBytes);
|
||||
String sm4Key = HexUtil.encodeHexStr(keyBytes);
|
||||
String sm4Iv = HexUtil.encodeHexStr(ivBytes);
|
||||
System.out.println("========== SM4 密钥 ==========");
|
||||
System.out.println("SM4密钥: " + sm4Key);
|
||||
System.out.println("SM4 IV: " + sm4Iv);
|
||||
System.out.println("================================");
|
||||
System.out.println();
|
||||
System.out.println("--- SM4密钥混淆代码(替换 SM4_KEY_DATA 和 SM4_KEY_MASK)---");
|
||||
printObfuscatedCode("SM4_KEY", sm4Key);
|
||||
System.out.println();
|
||||
System.out.println("--- SM4 IV混淆代码(替换 SM4_IV_DATA 和 SM4_IV_MASK)---");
|
||||
printObfuscatedCode("SM4_IV", sm4Iv);
|
||||
}
|
||||
|
||||
/**
|
||||
* 直接运行此方法即可生成全套新密钥及混淆代码
|
||||
* 将输出的混淆数组替换到 CommonCryptogramUtil 中对应位置即可
|
||||
*/
|
||||
public static void main(String[] args) {
|
||||
System.out.println("==========================================");
|
||||
System.out.println(" 全套密钥生成 & 混淆代码输出");
|
||||
System.out.println("==========================================");
|
||||
System.out.println();
|
||||
generateSm2KeyPair();
|
||||
System.out.println();
|
||||
generateSm4Key();
|
||||
System.out.println();
|
||||
System.out.println("==========================================");
|
||||
System.out.println("使用方式:");
|
||||
System.out.println("1. 将【公钥】明文字符串替换 CommonCryptogramUtil 中的 PUBLIC_KEY");
|
||||
System.out.println("2. 将【私钥混淆代码】替换 PRIVATE_KEY_DATA 和 PRIVATE_KEY_MASK");
|
||||
System.out.println("3. 将【SM4密钥混淆代码】替换 SM4_KEY_DATA 和 SM4_KEY_MASK");
|
||||
System.out.println("4. 将【SM4 IV混淆代码】替换 SM4_IV_DATA 和 SM4_IV_MASK");
|
||||
System.out.println("注意:更换密钥后,已加密的历史数据将无法解密,请确保数据已迁移!");
|
||||
System.out.println("==========================================");
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -23,7 +23,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.fhs.trans.service.impl.DictionaryTransService;
|
||||
import org.dromara.trans.service.impl.DictionaryTransService;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.beans.factory.InitializingBean;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
+2
-2
@@ -15,8 +15,8 @@ package vip.xiaonuo.biz.modular.org.entity;
|
||||
import com.baomidou.mybatisplus.annotation.FieldStrategy;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fhs.core.trans.anno.Trans;
|
||||
import com.fhs.core.trans.constant.TransType;
|
||||
import org.dromara.core.trans.anno.Trans;
|
||||
import org.dromara.core.trans.constant.TransType;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
+2
-2
@@ -17,8 +17,8 @@ import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.fhs.core.trans.anno.Trans;
|
||||
import com.fhs.core.trans.constant.TransType;
|
||||
import org.dromara.core.trans.anno.Trans;
|
||||
import org.dromara.core.trans.constant.TransType;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
+1
-1
@@ -43,7 +43,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.fhs.trans.service.impl.TransService;
|
||||
import org.dromara.trans.service.impl.TransService;
|
||||
import jakarta.annotation.Resource;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import org.apache.poi.ss.usermodel.*;
|
||||
|
||||
+2
-2
@@ -16,8 +16,8 @@ import com.baomidou.mybatisplus.annotation.FieldStrategy;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.fhs.core.trans.anno.Trans;
|
||||
import com.fhs.core.trans.constant.TransType;
|
||||
import org.dromara.core.trans.anno.Trans;
|
||||
import org.dromara.core.trans.constant.TransType;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
+1
-1
@@ -32,7 +32,7 @@ import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.fhs.trans.service.impl.TransService;
|
||||
import org.dromara.trans.service.impl.TransService;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
+1
-1
@@ -28,7 +28,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.fhs.trans.service.impl.DictionaryTransService;
|
||||
import org.dromara.trans.service.impl.DictionaryTransService;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.beans.factory.InitializingBean;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
+2
-2
@@ -15,8 +15,8 @@ package vip.xiaonuo.sys.modular.org.entity;
|
||||
import com.baomidou.mybatisplus.annotation.FieldStrategy;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fhs.core.trans.anno.Trans;
|
||||
import com.fhs.core.trans.constant.TransType;
|
||||
import org.dromara.core.trans.anno.Trans;
|
||||
import org.dromara.core.trans.constant.TransType;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
+2
-2
@@ -17,8 +17,8 @@ import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.fhs.core.trans.anno.Trans;
|
||||
import com.fhs.core.trans.constant.TransType;
|
||||
import org.dromara.core.trans.anno.Trans;
|
||||
import org.dromara.core.trans.constant.TransType;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
+1
-1
@@ -57,7 +57,7 @@ import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.fhs.trans.service.impl.TransService;
|
||||
import org.dromara.trans.service.impl.TransService;
|
||||
import jakarta.annotation.Resource;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import org.apache.poi.ss.usermodel.*;
|
||||
|
||||
@@ -122,4 +122,9 @@
|
||||
|
||||
</springProfile>
|
||||
|
||||
<!-- 关闭trans日志输出 -->
|
||||
<logger name="org.dromara.trans" level="OFF"/>
|
||||
<logger name="org.dromara.cache" level="OFF"/>
|
||||
<logger name="org.dromara.common" level="OFF"/>
|
||||
|
||||
</configuration>
|
||||
Reference in New Issue
Block a user