🔨 修改 spring 应用名称.

This commit is contained in:
lijiahang
2024-06-17 10:13:23 +08:00
parent f618aef988
commit dfd2ec45f4
5 changed files with 11 additions and 8 deletions

View File

@@ -16,7 +16,10 @@ public interface AppConst extends OrionConst {
*/ */
String VERSION = "2.0.8"; String VERSION = "2.0.8";
String ORION_VISOR = "orion-visor"; /**
* 同 ${spring.application.name}
*/
String APP_NAME = "orion-visor";
String GITHUB = "https://github.com/dromara/orion-visor"; String GITHUB = "https://github.com/dromara/orion-visor";

View File

@@ -47,7 +47,7 @@ public class PathUtils {
public static String getAppPath(boolean isWindows, String username) { public static String getAppPath(boolean isWindows, String username) {
return getHomePath(isWindows, username) return getHomePath(isWindows, username)
+ "/" + AppConst.ORION + "/" + AppConst.ORION
+ "/" + AppConst.ORION_VISOR; + "/" + AppConst.APP_NAME;
} }
/** /**

View File

@@ -51,7 +51,7 @@ public class BannerApplicationRunner implements ApplicationRunner {
@Override @Override
public void run(ApplicationArguments args) { public void run(ApplicationArguments args) {
AnsiAppender appender = AnsiAppender.create() AnsiAppender appender = AnsiAppender.create()
.append(AnsiForeground.BRIGHT_GREEN, ":: orion-visor-launch v" + version + " 服务已启动(" + env + ") ::\n"); .append(AnsiForeground.BRIGHT_GREEN, ":: orion-visor v" + version + " 服务已启动(" + env + ") ::\n");
// swagger 地址 // swagger 地址
if (apiDocsEnabled) { if (apiDocsEnabled) {
appender.append(AnsiForeground.BRIGHT_GREEN, ":: swagger 文档 ") appender.append(AnsiForeground.BRIGHT_GREEN, ":: swagger 文档 ")

View File

@@ -3,7 +3,7 @@ server:
spring: spring:
application: application:
name: orion-visor-launch name: orion-visor
profiles: profiles:
active: dev active: dev
main: main:
@@ -142,7 +142,7 @@ knife4j:
logging: logging:
file: file:
path: ${user.home}/orion/logs/orion-visor path: ${user.home}/orion/logs/${spring.application.name}
name: ${logging.file.path}/app.log name: ${logging.file.path}/app.log
logback: logback:
rollingpolicy: rollingpolicy:
@@ -253,14 +253,14 @@ orion:
timestamp-prefix: false timestamp-prefix: false
date-directory: false date-directory: false
storage-path: ${user.home} storage-path: ${user.home}
base-path: /orion/orion-visor/storage base-path: /orion/${spring.application.name}/storage
# 日志文件存储 # 日志文件存储
logs: logs:
enabled: true enabled: true
timestamp-prefix: false timestamp-prefix: false
date-directory: false date-directory: false
storage-path: ${user.home} storage-path: ${user.home}
base-path: /orion/orion-visor/logs base-path: /orion/${spring.application.name}/logs
security: security:
password-encoder-length: 4 password-encoder-length: 4
# 匿名接口 # 匿名接口

View File

@@ -342,7 +342,7 @@ public class SystemUserServiceImpl implements SystemUserService {
/** /**
* 删除主要用户缓存 其他的缓存自动过期 * 删除主要用户缓存 其他的缓存自动过期
* *
* @param userList * @param userList userList
*/ */
private void deleteUserCacheKey(List<SystemUserDO> userList) { private void deleteUserCacheKey(List<SystemUserDO> userList) {
Set<String> deleteKeys = new HashSet<>(); Set<String> deleteKeys = new HashSet<>();