|
|
@@ -1,16 +1,11 @@
|
|
|
package top.haijunit.train;
|
|
|
|
|
|
-import org.slf4j.Logger;
|
|
|
-import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.boot.Banner;
|
|
|
import org.springframework.boot.SpringApplication;
|
|
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
|
|
import org.springframework.boot.context.metrics.buffering.BufferingApplicationStartup;
|
|
|
import org.springframework.cache.annotation.EnableCaching;
|
|
|
import org.springframework.scheduling.annotation.EnableScheduling;
|
|
|
-import top.haijunit.train.utils.LicenseUtil;
|
|
|
-
|
|
|
-import java.io.File;
|
|
|
|
|
|
/**
|
|
|
* @author zhang
|
|
|
@@ -22,21 +17,7 @@ import java.io.File;
|
|
|
@SpringBootApplication
|
|
|
public class TrainServerMain {
|
|
|
|
|
|
- private static final Logger logger = LoggerFactory.getLogger(TrainServerMain.class);
|
|
|
-
|
|
|
public static void main(String[] args) {
|
|
|
- File file = new File(LicenseUtil.LICENSE_FILE);
|
|
|
- if (!file.exists()) {
|
|
|
- String machineCode = LicenseUtil.getMachineCode();
|
|
|
- logger.info("\033[1;33m {} \033[0m", String.format("""
|
|
|
-
|
|
|
- ========== 未授权,请联系管理员授权 ==========
|
|
|
- \t 授权时间已过期,请来及时联系管理员
|
|
|
- \t 授权机器码:\t%s
|
|
|
- """, machineCode + LicenseUtil.MARK + LicenseUtil.generateCheckKey(machineCode)));
|
|
|
- top.haijunit.common.utils.LicenseUtil.runVbsExpired();
|
|
|
- System.exit(1);
|
|
|
- }
|
|
|
SpringApplication application = new SpringApplication(TrainServerMain.class);
|
|
|
application.setApplicationStartup(new BufferingApplicationStartup(2048));
|
|
|
application.setBannerMode(Banner.Mode.OFF);
|