feat: license公钥
This commit is contained in:
10
pom.xml
10
pom.xml
@@ -436,6 +436,16 @@
|
||||
<resource>
|
||||
<directory>src/main/resources</directory>
|
||||
<filtering>true</filtering>
|
||||
<excludes>
|
||||
<exclude>*.keystore</exclude>
|
||||
</excludes>
|
||||
</resource>
|
||||
<resource>
|
||||
<directory>src/main/resources</directory>
|
||||
<filtering>false</filtering>
|
||||
<includes>
|
||||
<include>*.keystore</include>
|
||||
</includes>
|
||||
</resource>
|
||||
</resources>
|
||||
</build>
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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";
|
||||
}
|
||||
|
||||
@@ -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
|
||||
BIN
wfc-gateway/src/main/resources/publicCerts.keystore
Normal file
BIN
wfc-gateway/src/main/resources/publicCerts.keystore
Normal file
Binary file not shown.
Reference in New Issue
Block a user