2
0

feat: license公钥

This commit is contained in:
caiyuchao
2025-04-15 16:49:52 +08:00
parent 8db29f5dcc
commit 475b9a5184
5 changed files with 17 additions and 14 deletions

View File

@@ -2,8 +2,6 @@ package org.wfc.common.license;
import de.schlichtherle.license.AbstractKeyStoreParam;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
@@ -54,7 +52,8 @@ public class CustomKeyStoreParam extends AbstractKeyStoreParam {
*/
@Override
public InputStream getStream() throws IOException {
final InputStream in = new FileInputStream(new File(storePath));
// final InputStream in = new FileInputStream(new File(storePath));
InputStream in = this.getClass().getClassLoader().getResourceAsStream(storePath);
if (null == in) {
throw new FileNotFoundException(storePath);
}

View File

@@ -15,25 +15,25 @@ public class LicenseProperties {
/**
* 证书subject
*/
private String subject;
private String subject = "license_wfc";
/**
* 公钥别称
*/
private String publicAlias;
private String publicAlias = "publicCert";
/**
* 访问公钥库的密码
*/
private String storePass;
private String storePass = "public_wfc_Admin123";
/**
* 证书生成路径
*/
private String licensePath;
private String licensePath = "/opt/wfc/license/license.lic";
/**
* 密钥库存储路径
*/
private String publicKeysStorePath;
private String publicKeysStorePath = "publicCerts.keystore";
}

View File

@@ -1,6 +0,0 @@
license:
subject: license_demo
publicAlias: publicCert
storePass: public_password1234
licensePath: D:/workspace/gitee/spring-boot2-license/license/license.lic
publicKeysStorePath: D:/workspace/gitee/spring-boot2-license/license/publicCerts.keystore