Created
May 28, 2017 19:44
-
-
Save marco-mendes/dead57a4067ca20db31425ed99896189 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static void main(String[] args) throws UnknownHostException { | |
SpringApplication app = new SpringApplication(AngularspringbootmicrosservicoApp.class); | |
DefaultProfileUtil.addDefaultProfile(app); | |
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()); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment