优化 Application 启动完成输出的提示信息

This commit is contained in:
thinkgem
2025-10-19 13:24:10 +08:00
parent e43e4f7567
commit b90f1252b1
6 changed files with 33 additions and 34 deletions

View File

@@ -12,8 +12,6 @@
*/ */
package com.jeesite.modules; package com.jeesite.modules;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.jeesite.modules.cloud.feign.EnableFeignClients; import com.jeesite.modules.cloud.feign.EnableFeignClients;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
@@ -38,9 +36,9 @@ public class ${@StringUtils.capCamelCase(moduleCode)}Application extends SpringB
public static void main(String[] args) { public static void main(String[] args) {
SpringApplication.run(${@StringUtils.capCamelCase(moduleCode)}Application.class, args); SpringApplication.run(${@StringUtils.capCamelCase(moduleCode)}Application.class, args);
logger.info( logger.info(
"\r\n\r\n==============================================================\r\n" "\n\n==============================================================\n"
+ "\r\n " + ${@StringUtils.capCamelCase(moduleCode)}Application.class.getName() + " 启动完成。" + "\n " + ${@StringUtils.capCamelCase(moduleCode)}Application.class.getName() + " 启动完成。\n"
+ "\r\n\r\n==============================================================\r\n"); + "\n==============================================================\n");
} }
@Override @Override

View File

@@ -13,9 +13,9 @@
<inceptionYear>2013-Now</inceptionYear> <inceptionYear>2013-Now</inceptionYear>
<modules> <modules>
<module>core</module>
<module>app</module> <module>app</module>
<module>cms</module> <module>cms</module>
<module>core</module>
<module>static</module> <module>static</module>
<module>test</module> <module>test</module>
</modules> </modules>

View File

@@ -25,12 +25,12 @@ public class ApiApplication extends SpringBootServletInitializer {
public static void main(String[] args) { public static void main(String[] args) {
SpringApplication.run(ApiApplication.class, args); SpringApplication.run(ApiApplication.class, args);
logger.info( logger.info(
"\r\n\r\n==============================================================\r\n" "\n\n==============================================================\n"
+ "\r\n 启动完成接口地址http://127.0.0.1:" + "\n 启动完成接口地址http://127.0.0.1:{}\n"
+ Global.getProperty("server.port") + FileUtils.path("/" + "\n 默认管理账号: system 密码: admin\n"
+ Global.getProperty("server.servlet.context-path")) + "\n==============================================================\n",
+ "\r\n\r\n 默认管理账号: system 密码: admin" Global.getProperty("server.port") + FileUtils.path("/"
+ "\r\n\r\n==============================================================\r\n"); + Global.getProperty("server.servlet.context-path")));
} }
@Override @Override

View File

@@ -41,19 +41,20 @@ public class FastApplication extends SpringBootServletInitializer {
String ctxPath = Global.getProperty("server.servlet.context-path"); String ctxPath = Global.getProperty("server.servlet.context-path");
if (StringUtils.isNoneBlank(vuePath, ctxPath)) { if (StringUtils.isNoneBlank(vuePath, ctxPath)) {
logger.info( logger.info(
"\r\n\r\n==============================================================\r\n" "\n\n==============================================================\n"
+ "\r\n 提示:您修改了 server.servlet.context-path 参数,需要您" + "\n 提示:您修改了 server.servlet.context-path 参数,需要您"
+ "\r\n 同步修改 _app.config.js 中的 VITE_GLOB_API_URL_PREFIX 参数 " + "\n 同步修改 _app.config.js 中的 VITE_GLOB_API_URL_PREFIX 参数 "
+ "\r\n 请修改为 VITE_GLOB_API_URL_PREFIX=\"" + ctxPath + "\"" + "\n 请修改为 VITE_GLOB_API_URL_PREFIX=\"{}\" 并重新打包 Vue\n"
+ "\r\n\r\n==============================================================\r\n"); + "\n==============================================================\n",
ctxPath);
} }
logger.info( logger.info(
"\r\n\r\n==============================================================\r\n" "\n\n==============================================================\n"
+ "\r\n 启动完成访问地址http://127.0.0.1:" + "\n 启动完成访问地址http://127.0.0.1:{}\n"
+ Global.getProperty("server.port") + FileUtils.path("/" + "\n 默认管理账号: system 密码: admin\n"
+ Global.getProperty("server.servlet.context-path")) + "\n==============================================================\n",
+ "\r\n\r\n 默认管理账号: system 密码: admin" Global.getProperty("server.port") + FileUtils.path("/"
+ "\r\n\r\n==============================================================\r\n"); + Global.getProperty("server.servlet.context-path")));
} }
@Override @Override

View File

@@ -25,12 +25,12 @@ public class MiniApplication extends SpringBootServletInitializer {
public static void main(String[] args) { public static void main(String[] args) {
SpringApplication.run(MiniApplication.class, args); SpringApplication.run(MiniApplication.class, args);
logger.info( logger.info(
"\r\n\r\n==============================================================\r\n" "\n\n==============================================================\n"
+ "\r\n 启动完成,监控地址http://127.0.0.1:" + "\n 启动完成,访问地址http://127.0.0.1:{}\n"
+ Global.getProperty("server.port") + FileUtils.path("/" + "\n==============================================================\n",
Global.getProperty("server.port") + FileUtils.path("/"
+ Global.getProperty("server.servlet.context-path") + Global.getProperty("server.servlet.context-path")
+ Global.getAdminPath()) + "/state/server/index" + Global.getAdminPath()) + "/state/server/index");
+ "\r\n\r\n==============================================================\r\n");
} }
@Override @Override

View File

@@ -25,12 +25,12 @@ public class Application extends SpringBootServletInitializer {
public static void main(String[] args) { public static void main(String[] args) {
SpringApplication.run(Application.class, args); SpringApplication.run(Application.class, args);
logger.info( logger.info(
"\r\n\r\n==============================================================\r\n" "\n\n==============================================================\n"
+ "\r\n 启动完成访问地址http://127.0.0.1:" + "\n 启动完成访问地址http://127.0.0.1:{}\n"
+ Global.getProperty("server.port") + FileUtils.path("/" + "\n 默认管理账号: system 密码: admin\n"
+ Global.getProperty("server.servlet.context-path")) + "\n==============================================================\n",
+ "\r\n\r\n 默认管理账号: system 密码: admin" Global.getProperty("server.port") + FileUtils.path("/"
+ "\r\n\r\n==============================================================\r\n"); + Global.getProperty("server.servlet.context-path")));
} }
@Override @Override