👽调整启动端口日志

pull/24/head
jizhuozhi 2018-07-20 13:58:21 +08:00 committed by GitHub
parent 81b9389d34
commit dd8c026410
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 2 deletions

View File

@ -4,6 +4,7 @@ import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.context.ApplicationContext;
/**
* @author RYAN0UP
@ -14,7 +15,8 @@ import org.springframework.cache.annotation.EnableCaching;
@EnableCaching
public class Application {
public static void main(String[] args) {
SpringApplication.run(Application.class, args);
log.info("Halo started at http://localhost:8090");
ApplicationContext context = SpringApplication.run(Application.class, args);
String serverPort = context.getEnvironment().getProperty("server.port");
log.info("Halo started at http://localhost:" + serverPort);
}
}