Browse Source

启动成功打印xxl-job-admin访问地址

pull/7058/head
EightMonth 3 months ago
parent
commit
33be0079f0
  1. 13
      jeecg-boot/jeecg-server-cloud/jeecg-visual/jeecg-cloud-xxljob/src/main/java/com/xxl/job/admin/XxlJobAdminApplication.java

13
jeecg-boot/jeecg-server-cloud/jeecg-visual/jeecg-cloud-xxljob/src/main/java/com/xxl/job/admin/XxlJobAdminApplication.java

@ -1,16 +1,27 @@
package com.xxl.job.admin;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.core.env.Environment;
/**
* @author xuxueli 2018-10-28 00:38:13
*/
@SpringBootApplication
@Slf4j
public class XxlJobAdminApplication {
public static void main(String[] args) {
SpringApplication.run(XxlJobAdminApplication.class, args);
ConfigurableApplicationContext application = SpringApplication.run(XxlJobAdminApplication.class, args);
Environment env = application.getEnvironment();
String port = env.getProperty("server.port");
String path = env.getProperty("server.servlet.context-path");
log.info("\n----------------------------------------------------------\n\t" +
"Application XxlJobAdmin is running! Access URLs:\n\t" +
"Local: \t\thttp://localhost:" + port + path + "/\n\t" +
"----------------------------------------------------------");
}
}
Loading…
Cancel
Save