#AI
Junjie
3 天以前 53fa1addcd22557f6541092a151a3064779d3f93
src/main/java/com/zy/system/entity/license/LicenseCheckListener.java
@@ -1,6 +1,7 @@
package com.zy.system.entity.license;
import com.core.common.Cools;
import com.zy.core.ServerBootstrap;
import com.zy.system.entity.LicenseInfos;
import com.zy.system.service.LicenseInfosService;
import com.zy.system.timer.LicenseTimer;
@@ -57,6 +58,8 @@
    private LicenseTimer licenseTimer;
    @Autowired
    private LicenseInfosService licenseInfosService;
    @Autowired
    private ServerBootstrap serverBootstrap;
    @Override
    public void onApplicationEvent(ContextRefreshedEvent event) {
@@ -108,9 +111,13 @@
                    Long num = endTime - starTime;//时间戳相差的毫秒数
                    int day = (int) (num / 24 / 60 / 60 / 1000);
                    licenseTimer.setLicenseDays(day);
                    try {
                        serverBootstrap.init();
                    }catch (Exception e){
                        e.printStackTrace();
                    }
                }
                return install != null;
            } catch (Exception e) {
                e.printStackTrace();