From ece092e4c5d4e968b424421c6f78b065bbb0bd73 Mon Sep 17 00:00:00 2001
From: Junjie <fallin.jie@qq.com>
Date: 星期六, 24 八月 2024 15:13:10 +0800
Subject: [PATCH] #修复目标站显示错误问题
---
src/main/java/com/zy/system/entity/license/LicenseCheckListener.java | 35 ++++++++++++++++++++++++-----------
1 files changed, 24 insertions(+), 11 deletions(-)
diff --git a/src/main/java/com/zy/system/entity/license/LicenseCheckListener.java b/src/main/java/com/zy/system/entity/license/LicenseCheckListener.java
index 139b49d..e268997 100644
--- a/src/main/java/com/zy/system/entity/license/LicenseCheckListener.java
+++ b/src/main/java/com/zy/system/entity/license/LicenseCheckListener.java
@@ -10,6 +10,9 @@
import org.springframework.context.event.ContextRefreshedEvent;
import org.springframework.stereotype.Component;
+import java.io.File;
+import java.io.InputStream;
+
/**
* 鍦ㄩ」鐩惎鍔ㄦ椂瀹夎璇佷功
*/
@@ -61,20 +64,30 @@
if(!Cools.isEmpty(licensePath)){
logger.info("++++++++ 寮�濮嬪姞杞借鍙瘉 ++++++++");
- LicenseVerifyParam param = new LicenseVerifyParam();
- param.setSubject(subject);
- param.setPublicAlias(publicAlias);
- param.setStorePass(storePass);
- param.setLicensePath(licensePath);
- param.setPublicKeysStorePath(publicKeysStorePath);
+ try {
+// String publicKeysStoreFileName = this.getClass().getClassLoader().getResource(publicKeysStorePath).getPath();
+// File publicKeysStoreFile = new File(publicKeysStoreFileName);
+//
+// String licensePathFileName = this.getClass().getClassLoader().getResource(licensePath).getPath();
+// File licensePathFile = new File(licensePathFileName);
- LicenseVerify licenseVerify = new LicenseVerify();
- //瀹夎璇佷功
- LicenseContent install = licenseVerify.install(param);
+ LicenseVerifyParam param = new LicenseVerifyParam();
+ param.setSubject(subject);
+ param.setPublicAlias(publicAlias);
+ param.setStorePass(storePass);
+ param.setLicensePath(licensePath);
+ param.setPublicKeysStorePath(publicKeysStorePath);
- logger.info("++++++++ 璁稿彲璇佸姞杞界粨鏉� ++++++++");
+ LicenseVerify licenseVerify = new LicenseVerify();
+ //瀹夎璇佷功
+ LicenseContent install = licenseVerify.install(param);
- return install != null;
+ logger.info("++++++++ 璁稿彲璇佸姞杞界粨鏉� ++++++++");
+
+ return install != null;
+ } catch (Exception e) {
+ return false;
+ }
}
return false;
--
Gitblit v1.9.1