fix: license调整
This commit is contained in:
@@ -67,7 +67,7 @@ public class LicenseCheckRunner implements ApplicationRunner {
|
|||||||
// startTimer();
|
// startTimer();
|
||||||
this.licenseProperties = licenseProperties;
|
this.licenseProperties = licenseProperties;
|
||||||
if (StrUtil.isNotEmpty(licenseProperties.getLicensePath())) {
|
if (StrUtil.isNotEmpty(licenseProperties.getLicensePath())) {
|
||||||
install();
|
// install();
|
||||||
try {
|
try {
|
||||||
String readMd5 = getMd5(licenseProperties.getLicensePath());
|
String readMd5 = getMd5(licenseProperties.getLicensePath());
|
||||||
isLoad = true;
|
isLoad = true;
|
||||||
@@ -135,13 +135,13 @@ public class LicenseCheckRunner implements ApplicationRunner {
|
|||||||
|
|
||||||
//对象序列化为json
|
//对象序列化为json
|
||||||
String jsonString = serverInfos.toJsonString();
|
String jsonString = serverInfos.toJsonString();
|
||||||
System.out.println("原始数据 = " + jsonString);
|
// System.out.println("原始数据 = " + jsonString);
|
||||||
//加密
|
//加密
|
||||||
String encryptedJson = LicenseUtils.encrypt(jsonString);
|
String encryptedJson = LicenseUtils.encrypt(jsonString);
|
||||||
System.out.println("加密后 = " + encryptedJson);
|
System.out.println("加密后 = " + encryptedJson);
|
||||||
// 解密
|
// 解密
|
||||||
String decryptedJson = LicenseUtils.decrypt(encryptedJson);
|
String decryptedJson = LicenseUtils.decrypt(encryptedJson);
|
||||||
System.out.println("解密后 = " + decryptedJson);
|
// System.out.println("解密后 = " + decryptedJson);
|
||||||
// 比较解密后的字符串与原始字符串
|
// 比较解密后的字符串与原始字符串
|
||||||
if (jsonString.equals(decryptedJson)) {
|
if (jsonString.equals(decryptedJson)) {
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user