fix: keystore

This commit is contained in:
caiyuchao
2025-04-15 14:16:18 +08:00
parent 88aae7d0dc
commit 15496d4644
2 changed files with 5 additions and 1 deletions

View File

@@ -34,6 +34,9 @@ public class LicenseCreatorController {
@Value("${license.licensePath}") @Value("${license.licensePath}")
private String licensePath; private String licensePath;
@Value("${license.privateKeysPath}")
private String privateKeysPath;
/** /**
* 获取服务器硬件信息 * 获取服务器硬件信息
* *
@@ -110,7 +113,7 @@ public class LicenseCreatorController {
} }
// 相对路径resources资源目录 // 相对路径resources资源目录
// String resourcePath = getClass().getClassLoader().getResource("").getPath(); // String resourcePath = getClass().getClassLoader().getResource("").getPath();
param.setPrivateKeysStorePath("/opt/license/keystore/privateKeys.keystore"); param.setPrivateKeysStorePath(licensePath);
// param.setPrivateKeysStorePath("D:\\projects\\testdir\\spring-boot2-license\\cloud-license-serve\\target\\classes\\privateCerts.keystore"); // param.setPrivateKeysStorePath("D:\\projects\\testdir\\spring-boot2-license\\cloud-license-serve\\target\\classes\\privateCerts.keystore");
param.setIssuedTime(new Date()); param.setIssuedTime(new Date());
param.setExpiryTime(genParam.getExpiryTime()); param.setExpiryTime(genParam.getExpiryTime());

View File

@@ -6,5 +6,6 @@ server.shutdown=graceful
spring.lifecycle.timeout-per-shutdown-phase=10s spring.lifecycle.timeout-per-shutdown-phase=10s
#License<73><65><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> #License<73><65><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
license.privateKeysPath=/opt/license/keystore/privateKeys.keystore
license.licensePath=/opt/license/license.lic license.licensePath=/opt/license/license.lic