新增 kkFIleView 的 banner 信息
This commit is contained in:
@ -1,8 +1,10 @@
|
||||
package cn.keking;
|
||||
|
||||
import cn.keking.config.AppBanner;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.boot.autoconfigure.web.ServerProperties;
|
||||
import org.springframework.boot.builder.SpringApplicationBuilder;
|
||||
import org.springframework.context.ConfigurableApplicationContext;
|
||||
import org.springframework.context.annotation.ComponentScan;
|
||||
@ -21,9 +23,10 @@ public class ServerMain {
|
||||
stopWatch.start();
|
||||
ConfigurableApplicationContext context = new SpringApplicationBuilder(ServerMain.class)
|
||||
.logStartupInfo(false)
|
||||
.banner(new AppBanner())
|
||||
.run(args);
|
||||
stopWatch.stop();
|
||||
String port = context.getEnvironment().getProperty("server.port");
|
||||
Integer port = context.getBean(ServerProperties.class).getPort();
|
||||
logger.info("kkFileView 服务启动完成,耗时:{}s,演示页请访问: http://127.0.0.1:{} ", stopWatch.getTotalTimeSeconds(), port);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user