自动化立体仓库 - WMS系统
1
ZY
2025-03-29 c65db22f67af8018ae7105ea00d8743e42835e13
src/main/java/com/zy/system/entity/license/LicenseCheckListener.java
@@ -54,7 +54,7 @@
        //root application context 没有parent
        ApplicationContext context = event.getApplicationContext().getParent();
        if(context == null){
            loadLicense();
            //loadLicense();
        }
    }
@@ -63,26 +63,30 @@
        if(!Cools.isEmpty(licensePath)){
            logger.info("++++++++ 开始加载许可证 ++++++++");
            String publicKeysStoreFileName = this.getClass().getClassLoader().getResource(publicKeysStorePath).getPath();
            File publicKeysStoreFile = new File(publicKeysStoreFileName);
            try {
                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);
                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(licensePathFile.getPath());
            param.setPublicKeysStorePath(publicKeysStoreFile.getPath());
                LicenseVerifyParam param = new LicenseVerifyParam();
                param.setSubject(subject);
                param.setPublicAlias(publicAlias);
                param.setStorePass(storePass);
                param.setLicensePath(licensePathFile.getPath());
                param.setPublicKeysStorePath(publicKeysStoreFile.getPath());
            LicenseVerify licenseVerify = new LicenseVerify();
            //安装证书
            LicenseContent install = licenseVerify.install(param);
                LicenseVerify licenseVerify = new LicenseVerify();
                //安装证书
                LicenseContent install = licenseVerify.install(param);
            logger.info("++++++++ 许可证加载结束 ++++++++");
                logger.info("++++++++ 许可证加载结束 ++++++++");
            return install != null;
                return install != null;
            } catch (Exception e) {
                return false;
            }
        }
        return false;