提取常量配置信息

This commit is contained in:
2026-04-22 11:17:19 +08:00
parent 8f6a5bd3e7
commit 830cd57f41
8 changed files with 63 additions and 3 deletions

View File

@@ -52,6 +52,11 @@
<artifactId>xtools-app-common-call</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.xujun</groupId>
<artifactId>xtools-app-common-config</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.xujun</groupId>
<artifactId>xtools-app-common-jar</artifactId>

View File

@@ -21,6 +21,7 @@
<module>xtools-app-common-mq</module>
<module>xtools-app-common-sentinel</module>
<module>xtools-app-common-task</module>
<module>xtools-app-common-config</module>
</modules>
</project>

View File

@@ -30,6 +30,13 @@
</dependency>
<!-- xtools end -->
<!-- 项目模块 begin -->
<dependency>
<groupId>org.xujun</groupId>
<artifactId>xtools-app-common-config</artifactId>
</dependency>
<!-- 项目模块 end -->
<!-- aop -->
<dependency>
<groupId>org.aspectj</groupId>

View File

@@ -1,5 +1,6 @@
package xtools.app.common.cache.enums;
import xtools.app.common.config.AppCommonConfig;
import xtools.boot.cache.redis.enums.BaseCacheEnum;
import xtools.core.extend.TemplateUtils;
@@ -52,7 +53,7 @@ public enum AppCache implements BaseCacheEnum {
/**
* 系统缓存前缀
*/
private final static String SYS_CACHE_PREFIX = "xtools-app:";
private final static String SYS_CACHE_PREFIX = AppCommonConfig.APP_CACHE_PREFIX;
/**
* key

View File

@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.xujun</groupId>
<artifactId>xtools-app-common</artifactId>
<version>1.0.0</version>
</parent>
<artifactId>xtools-app-common-config</artifactId>
</project>

View File

@@ -0,0 +1,26 @@
package xtools.app.common.config;
/**
* <p>Title : AppCommonConfig</p>
* <p>Description : AppCommonConfig</p>
* <p>DevelopTools : Idea_x64_v2026.1</p>
* <p>DevelopSystem : macOS Sequoia 15.7.5</p>
* <p>Company : org.xujun</p>
*
* @author : XuJun
* @version : 1.0.0
* @date : 2026/4/22 11:04
*/
public class AppCommonConfig {
/**
* 系统日志索引名称
*/
public static final String APP_SYS_LOG_ES_INDEX_NAME = "sys-log";
/**
* 系统缓存前缀
*/
public final static String APP_CACHE_PREFIX = "xtools-app:";
}

View File

@@ -13,6 +13,11 @@
<!-- 依赖 -->
<dependencies>
<!-- 项目模块 begin -->
<dependency>
<groupId>org.xujun</groupId>
<artifactId>xtools-app-common-config</artifactId>
</dependency>
<dependency>
<groupId>org.xujun</groupId>
<artifactId>xtools-app-sys-biz</artifactId>

View File

@@ -5,6 +5,7 @@ import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;
import xtools.app.common.config.AppCommonConfig;
/**
* <p>Title : EsSysLog</p>
@@ -23,8 +24,8 @@ public class EsSysLog {
/**
* ES索引名称
**/
public static final String INDEX_NAME = "log-sys_v16";
*/
public static final String INDEX_NAME = AppCommonConfig.APP_SYS_LOG_ES_INDEX_NAME;
/**
* 主键 ID