自动化立体仓库 - WMS系统
Junjie
2023-10-07 d1ebf5f7e43871a61ad5c751d559580eddc439f8
src/main/java/com/zy/system/entity/license/LicenseCheckListener.java
@@ -10,6 +10,8 @@
import org.springframework.context.event.ContextRefreshedEvent;
import org.springframework.stereotype.Component;
import java.io.File;
/**
 * 在项目启动时安装证书
 */
@@ -61,12 +63,18 @@
        if(!Cools.isEmpty(licensePath)){
            logger.info("++++++++ 开始加载许可证 ++++++++");
            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);
            LicenseVerifyParam param = new LicenseVerifyParam();
            param.setSubject(subject);
            param.setPublicAlias(publicAlias);
            param.setStorePass(storePass);
            param.setLicensePath(licensePath);
            param.setPublicKeysStorePath(publicKeysStorePath);
            param.setLicensePath(licensePathFile.getPath());
            param.setPublicKeysStorePath(publicKeysStoreFile.getPath());
            LicenseVerify licenseVerify = new LicenseVerify();
            //安装证书