|
|
@@ -32,8 +32,9 @@ public class RunnerLog implements ApplicationRunner {
|
|
|
if (LicenseUtil.licenseExpired()) {
|
|
|
log.info("\033[1;33m {} \033[0m", String.format("\n ========== 启动服务 =========="
|
|
|
+ "\n\t 授权时间已过期,请来及时联系管理员"
|
|
|
- + "\n\t 授权时间:\t%s"
|
|
|
- + "\n ============================", LicenseUtil.licenseUntil()));
|
|
|
+ + "\n\t 授权时间至:\t%s"
|
|
|
+ + "\n\t 授权已过期:\t%s天"
|
|
|
+ + "\n ============================", LicenseUtil.licenseUntil(), LicenseUtil.licenseRemaining()));
|
|
|
System.exit(SpringApplication.exit(ctx));
|
|
|
}
|
|
|
String appJvmName = ManagementFactory.getRuntimeMXBean().getName();
|
|
|
@@ -43,11 +44,14 @@ public class RunnerLog implements ApplicationRunner {
|
|
|
String httpUrl = "http://" + Optional.ofNullable(httpHost).orElse("127.0.0.1") + ":" + Optional.ofNullable(httpPort).orElse("8080") + path;
|
|
|
String format = String.format("\n ========== 启动服务 =========="
|
|
|
+ "\n\t 服务名称:\t%s"
|
|
|
+ + "\n\t 授权时间至:\t%s"
|
|
|
+ + "\n\t 授权剩余:\t%s天"
|
|
|
+ "\n\t 进程ID: \t%s"
|
|
|
+ "\n\t 启动时间:\t%s"
|
|
|
+ "\n\t 访问路径:\t%s"
|
|
|
+ "\n ============================",
|
|
|
ctx.getEnvironment().getProperty("spring.application.name"),
|
|
|
+ LicenseUtil.licenseUntil(), LicenseUtil.licenseRemaining(),
|
|
|
appJvmName.split("@")[0],
|
|
|
DateUtil.format(new Date(ctx.getStartupDate()), DatePattern.NORM_DATETIME_MS_PATTERN),
|
|
|
httpUrl
|