|
@@ -48,10 +48,12 @@ public class ApplicationUriPrinter implements CommandLineRunner {
|
|
|
String schema = "http://";
|
|
|
String localUrl = schema + PathUtils.replaceSlash(String.format("localhost:%s/%s/%s/", port, contextPath, Objects.toString(properties.getPrefix(), "")));
|
|
|
String externUrl = schema + PathUtils.replaceSlash(String.format("%s:%s/%s/%s/", ip, port, contextPath, Objects.toString(properties.getPrefix(), "")));
|
|
|
- System.out.println(
|
|
|
- "服务启动成功,magic-api已内置启动! Access URLs:\n\t" +
|
|
|
- "接口本地地址: \t\t" + localUrl + "\n\t" +
|
|
|
- "接口外部访问地址: \t" + externUrl
|
|
|
+ System.out.printf(
|
|
|
+ "服务启动成功,magic-api已内置启动! Access URLs:" +
|
|
|
+ "\n\t接口本地地址: \t\t%s" +
|
|
|
+ "\n\t接口外部访问地址: \t\t%s\n"
|
|
|
+ , localUrl
|
|
|
+ , externUrl
|
|
|
);
|
|
|
if (!StringUtils.isEmpty(magicWebPath)) {
|
|
|
String webPath = schema + PathUtils.replaceSlash(String.format("%s:%s/%s/%s/index.html", ip, port, contextPath, magicWebPath));
|
|
@@ -59,6 +61,5 @@ public class ApplicationUriPrinter implements CommandLineRunner {
|
|
|
}
|
|
|
System.out.println("\t可通过配置关闭输出: \tmagic-api.show-url=false");
|
|
|
System.out.println("********************************************当前服务相关地址********************************************");
|
|
|
-
|
|
|
}
|
|
|
}
|