?
package com.itheima.reggie;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.core.env.Environment;
import org.springframework.transaction.annotation.EnableTransactionManagement;
import java.net.InetAddress;
@Slf4j
@SpringBootApplication
@ServletComponentScan
@EnableTransactionManagement
public class ReggieApplication {
public static void main(String[] args) {
ConfigurableApplicationContext application = SpringApplication.run(ReggieApplication.class, args);
Environment env = application.getEnvironment();
String port = env.getProperty("server.port");
log.info("\n----------------------------------------------------------\n\t" +
"running success! Access URLs:\n\t" +
"Local: \t\thttp://localhost:" + port +"/backend/page/login/login.html"+"\n\t" +
"Swagger文档: \thttp://localhost:" + port + "/doc.html\n" +
"----------------------------------------------------------");
}
}