From a1e94379b115721b2e604070dc48063b8016f72f Mon Sep 17 00:00:00 2001
From: pang.jiabao <pang_jiabao@163.com>
Date: 星期二, 21 十月 2025 19:32:59 +0800
Subject: [PATCH] 侧面输送线出库码盘信息对接
---
src/main/java/com/zy/system/entity/license/LicenseCreator.java | 28 ++++++++++++++--------------
1 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/src/main/java/com/zy/system/entity/license/LicenseCreator.java b/src/main/java/com/zy/system/entity/license/LicenseCreator.java
index 01f2ad1..ad2bd06 100644
--- a/src/main/java/com/zy/system/entity/license/LicenseCreator.java
+++ b/src/main/java/com/zy/system/entity/license/LicenseCreator.java
@@ -13,8 +13,8 @@
* License鐢熸垚绫�
*/
public class LicenseCreator {
- private static Logger logger = LogManager.getLogger(LicenseCreator.class);
private final static X500Principal DEFAULT_HOLDER_AND_ISSUER = new X500Principal("CN=localhost, OU=localhost, O=localhost, L=SH, ST=SH, C=CN");
+ private static Logger logger = LogManager.getLogger(LicenseCreator.class);
private LicenseCreatorParam param;
public LicenseCreator(LicenseCreatorParam param) {
@@ -24,16 +24,16 @@
/**
* 鐢熸垚License璇佷功
*/
- public boolean generateLicense(){
+ public boolean generateLicense() {
try {
LicenseManager licenseManager = new CustomLicenseManager(initLicenseParam());
LicenseContent licenseContent = initLicenseContent();
- licenseManager.store(licenseContent,new File(param.getLicensePath()));
+ licenseManager.store(licenseContent, new File(param.getLicensePath()));
return true;
- }catch (Exception e){
- logger.error(MessageFormat.format("璇佷功鐢熸垚澶辫触锛歿0}",param),e);
+ } catch (Exception e) {
+ logger.error(MessageFormat.format("璇佷功鐢熸垚澶辫触锛歿0}", param), e);
return false;
}
}
@@ -41,22 +41,22 @@
/**
* 鍒濆鍖栬瘉涔︾敓鎴愬弬鏁�
*/
- private LicenseParam initLicenseParam(){
+ private LicenseParam initLicenseParam() {
Preferences preferences = Preferences.userNodeForPackage(LicenseCreator.class);
//璁剧疆瀵硅瘉涔﹀唴瀹瑰姞瀵嗙殑绉橀挜
CipherParam cipherParam = new DefaultCipherParam(param.getStorePass());
KeyStoreParam privateStoreParam = new CustomKeyStoreParam(LicenseCreator.class
- ,param.getPrivateKeysStorePath()
- ,param.getPrivateAlias()
- ,param.getStorePass()
- ,param.getKeyPass());
+ , param.getPrivateKeysStorePath()
+ , param.getPrivateAlias()
+ , param.getStorePass()
+ , param.getKeyPass());
LicenseParam licenseParam = new DefaultLicenseParam(param.getSubject()
- ,preferences
- ,privateStoreParam
- ,cipherParam);
+ , preferences
+ , privateStoreParam
+ , cipherParam);
return licenseParam;
}
@@ -64,7 +64,7 @@
/**
* 璁剧疆璇佷功鐢熸垚姝f枃淇℃伅
*/
- private LicenseContent initLicenseContent(){
+ private LicenseContent initLicenseContent() {
LicenseContent licenseContent = new LicenseContent();
licenseContent.setHolder(DEFAULT_HOLDER_AND_ISSUER);
licenseContent.setIssuer(DEFAULT_HOLDER_AND_ISSUER);
--
Gitblit v1.9.1