| | |
| | | public class XinQuanUserApplication { |
| | | |
| | | public static void main(String[] args) throws UnknownHostException { |
| | | SpringApplication app = new SpringApplicationBuilder(XinQuanUserApplication.class).build(args); |
| | | Environment env = app.run(args).getEnvironment(); |
| | | String protocol = "http"; |
| | | if (env.getProperty("server.ssl.key-store") != null) { |
| | | protocol = "https"; |
| | | try{ |
| | | SpringApplication app = new SpringApplicationBuilder(XinQuanUserApplication.class).build(args); |
| | | Environment env = app.run(args).getEnvironment(); |
| | | String protocol = "http"; |
| | | if (env.getProperty("server.ssl.key-store") != null) { |
| | | protocol = "https"; |
| | | } |
| | | log.info("--/\n---------------------------------------------------------------------------------------\n\t" + |
| | | "Application '{}' is running! Access URLs:\n\t" + |
| | | "Local: \t\t{}://localhost:{}\n\t" + |
| | | "External: \t{}://{}:{}\n\t" + |
| | | "Profile(s): \t{}" + |
| | | "\n---------------------------------------------------------------------------------------", |
| | | env.getProperty("spring.application.name"), |
| | | protocol, |
| | | env.getProperty("server.port"), |
| | | protocol, |
| | | InetAddress.getLocalHost().getHostAddress(), |
| | | env.getProperty("server.port"), |
| | | env.getActiveProfiles()); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | System.err.println(e); |
| | | } |
| | | log.info("--/\n---------------------------------------------------------------------------------------\n\t" + |
| | | "Application '{}' is running! Access URLs:\n\t" + |
| | | "Local: \t\t{}://localhost:{}\n\t" + |
| | | "External: \t{}://{}:{}\n\t" + |
| | | "Profile(s): \t{}" + |
| | | "\n---------------------------------------------------------------------------------------", |
| | | env.getProperty("spring.application.name"), |
| | | protocol, |
| | | env.getProperty("server.port"), |
| | | protocol, |
| | | InetAddress.getLocalHost().getHostAddress(), |
| | | env.getProperty("server.port"), |
| | | env.getActiveProfiles()); |
| | | |
| | | |
| | | } |
| | | } |