From e90dba0edc93be26e1509cfb2ec1d0681eb86e48 Mon Sep 17 00:00:00 2001
From: zhang <zc857179121@qq.com>
Date: 星期三, 27 八月 2025 08:37:04 +0800
Subject: [PATCH] 合并出库添加日志
---
src/main/java/com/zy/system/entity/license/LicenseCheckListener.java | 36 ++++++++++++++++++++----------------
1 files changed, 20 insertions(+), 16 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 75cee89..dcb61b1 100644
--- a/src/main/java/com/zy/system/entity/license/LicenseCheckListener.java
+++ b/src/main/java/com/zy/system/entity/license/LicenseCheckListener.java
@@ -54,7 +54,7 @@
//root application context 娌℃湁parent
ApplicationContext context = event.getApplicationContext().getParent();
if(context == null){
- loadLicense();
+ //loadLicense();
}
}
@@ -63,26 +63,30 @@
if(!Cools.isEmpty(licensePath)){
logger.info("++++++++ 寮�濮嬪姞杞借鍙瘉 ++++++++");
- String publicKeysStoreFileName = this.getClass().getClassLoader().getResource(publicKeysStorePath).getPath();
- File publicKeysStoreFile = new File(publicKeysStoreFileName);
+ 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);
+ String licensePathFileName = this.getClass().getClassLoader().getResource(licensePath).getPath();
+ File licensePathFile = new File(licensePathFileName);
- LicenseVerifyParam param = new LicenseVerifyParam();
- param.setSubject(subject);
- param.setPublicAlias(publicAlias);
- param.setStorePass(storePass);
- param.setLicensePath(licensePathFile.getPath());
- param.setPublicKeysStorePath(publicKeysStoreFile.getPath());
+ LicenseVerifyParam param = new LicenseVerifyParam();
+ param.setSubject(subject);
+ param.setPublicAlias(publicAlias);
+ param.setStorePass(storePass);
+ param.setLicensePath(licensePathFile.getPath());
+ param.setPublicKeysStorePath(publicKeysStoreFile.getPath());
- LicenseVerify licenseVerify = new LicenseVerify();
- //瀹夎璇佷功
- LicenseContent install = licenseVerify.install(param);
+ LicenseVerify licenseVerify = new LicenseVerify();
+ //瀹夎璇佷功
+ LicenseContent install = licenseVerify.install(param);
- logger.info("++++++++ 璁稿彲璇佸姞杞界粨鏉� ++++++++");
+ logger.info("++++++++ 璁稿彲璇佸姞杞界粨鏉� ++++++++");
- return install != null;
+ return install != null;
+ } catch (Exception e) {
+ return false;
+ }
}
return false;
--
Gitblit v1.9.1