diff --git a/pigx-auth/src/main/resources/logback-spring.xml b/pigx-auth/src/main/resources/logback-spring.xml
new file mode 100644
index 000000000..00fc55116
--- /dev/null
+++ b/pigx-auth/src/main/resources/logback-spring.xml
@@ -0,0 +1,87 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ${CONSOLE_LOG_PATTERN}
+
+
+
+
+
+ ${log.path}/debug.log
+
+ ${log.path}/%d{yyyy-MM, aux}/debug.%d{yyyy-MM-dd}.%i.log.gz
+ 50MB
+ 30
+
+
+ %date [%thread] %-5level [%logger{50}] %file:%line - %msg%n
+
+
+
+
+
+ ${log.path}/error.log
+
+ ${log.path}/%d{yyyy-MM}/error.%d{yyyy-MM-dd}.%i.log.gz
+ 50MB
+ 30
+
+
+ %date [%thread] %-5level [%logger{50}] %file:%line - %msg%n
+
+
+ ERROR
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/pigx-common/pigx-common-bom/pom.xml b/pigx-common/pigx-common-bom/pom.xml
index c10094b83..bf7e9a338 100644
--- a/pigx-common/pigx-common-bom/pom.xml
+++ b/pigx-common/pigx-common-bom/pom.xml
@@ -26,6 +26,11 @@
+
+ org.springframework.cloud
+ pigx-common-bom
+ 3.2
+ com.pig4cloudpigx-common-core
diff --git a/pigx-common/pigx-common-core/src/main/java/com/pig4cloud/pigx/common/core/sensitive/Sensitive.java b/pigx-common/pigx-common-core/src/main/java/com/pig4cloud/pigx/common/core/sensitive/Sensitive.java
new file mode 100644
index 000000000..a78f4422a
--- /dev/null
+++ b/pigx-common/pigx-common-core/src/main/java/com/pig4cloud/pigx/common/core/sensitive/Sensitive.java
@@ -0,0 +1,60 @@
+/*
+ * Copyright (c) 2018-2025, lengleng All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * Neither the name of the pig4cloud.com developer nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ * Author: lengleng (wangiegie@gmail.com)
+ */
+
+package com.pig4cloud.pigx.common.core.sensitive;
+
+import com.fasterxml.jackson.annotation.JacksonAnnotationsInside;
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * 对象脱敏注解
+ *
+ * @author mayee
+ * @version v1.0
+ **/
+@Retention(RetentionPolicy.RUNTIME)
+@Target(ElementType.FIELD)
+@JacksonAnnotationsInside
+@JsonSerialize(using = SensitiveSerialize.class)
+public @interface Sensitive {
+
+ /**
+ * 脱敏数据类型, 非Customer时, 将忽略 refixNoMaskLen 和 suffixNoMaskLen 和 maskStr
+ */
+ SensitiveTypeEnum type() default SensitiveTypeEnum.CUSTOMER;
+
+ /**
+ * 前置不需要打码的长度
+ */
+ int prefixNoMaskLen() default 0;
+
+ /**
+ * 后置不需要打码的长度
+ */
+ int suffixNoMaskLen() default 0;
+
+ /**
+ * 用什么打码
+ */
+ String maskStr() default "*";
+
+}
diff --git a/pigx-common/pigx-common-core/src/main/java/com/pig4cloud/pigx/common/core/sensitive/SensitiveSerialize.java b/pigx-common/pigx-common-core/src/main/java/com/pig4cloud/pigx/common/core/sensitive/SensitiveSerialize.java
new file mode 100644
index 000000000..a1b683ebd
--- /dev/null
+++ b/pigx-common/pigx-common-core/src/main/java/com/pig4cloud/pigx/common/core/sensitive/SensitiveSerialize.java
@@ -0,0 +1,107 @@
+/*
+ * Copyright (c) 2018-2025, lengleng All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * Neither the name of the pig4cloud.com developer nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ * Author: lengleng (wangiegie@gmail.com)
+ */
+
+package com.pig4cloud.pigx.common.core.sensitive;
+
+import com.fasterxml.jackson.core.JsonGenerator;
+import com.fasterxml.jackson.databind.BeanProperty;
+import com.fasterxml.jackson.databind.JsonMappingException;
+import com.fasterxml.jackson.databind.JsonSerializer;
+import com.fasterxml.jackson.databind.SerializerProvider;
+import com.fasterxml.jackson.databind.ser.ContextualSerializer;
+import com.google.common.base.Preconditions;
+import com.pig4cloud.pigx.common.core.util.DesensitizedUtils;
+import lombok.AllArgsConstructor;
+import lombok.NoArgsConstructor;
+
+import java.io.IOException;
+import java.util.Objects;
+
+/**
+ * @author lengleng
+ * @date 2019-08-13
+ *
+ * 脱敏序列化
+ */
+@NoArgsConstructor
+@AllArgsConstructor
+public class SensitiveSerialize extends JsonSerializer implements ContextualSerializer {
+
+ private SensitiveTypeEnum type;
+ private Integer prefixNoMaskLen;
+ private Integer suffixNoMaskLen;
+ private String maskStr;
+
+ @Override
+ public void serialize(final String origin, final JsonGenerator jsonGenerator,
+ final SerializerProvider serializerProvider) throws IOException {
+ Preconditions.checkNotNull(type, "Sensitive type enum should not be null.");
+ switch (type) {
+ case CHINESE_NAME:
+ jsonGenerator.writeString(DesensitizedUtils.chineseName(origin));
+ break;
+ case ID_CARD:
+ jsonGenerator.writeString(DesensitizedUtils.idCardNum(origin));
+ break;
+ case FIXED_PHONE:
+ jsonGenerator.writeString(DesensitizedUtils.fixedPhone(origin));
+ break;
+ case MOBILE_PHONE:
+ jsonGenerator.writeString(DesensitizedUtils.mobilePhone(origin));
+ break;
+ case ADDRESS:
+ jsonGenerator.writeString(DesensitizedUtils.address(origin));
+ break;
+ case EMAIL:
+ jsonGenerator.writeString(DesensitizedUtils.email(origin));
+ break;
+ case BANK_CARD:
+ jsonGenerator.writeString(DesensitizedUtils.bankCard(origin));
+ break;
+ case PASSWORD:
+ jsonGenerator.writeString(DesensitizedUtils.password(origin));
+ break;
+ case KEY:
+ jsonGenerator.writeString(DesensitizedUtils.key(origin));
+ break;
+ case CUSTOMER:
+ jsonGenerator.writeString(DesensitizedUtils.desValue(origin, prefixNoMaskLen, suffixNoMaskLen, maskStr));
+ break;
+ default:
+ throw new IllegalArgumentException("Unknow sensitive type enum " + type);
+ }
+ }
+
+ @Override
+ public JsonSerializer> createContextual(final SerializerProvider serializerProvider,
+ final BeanProperty beanProperty) throws JsonMappingException {
+ if (beanProperty != null) {
+ if (Objects.equals(beanProperty.getType().getRawClass(), String.class)) {
+ Sensitive sensitive = beanProperty.getAnnotation(Sensitive.class);
+ if (sensitive == null) {
+ sensitive = beanProperty.getContextAnnotation(Sensitive.class);
+ }
+ if (sensitive != null) {
+ return new SensitiveSerialize(sensitive.type(), sensitive.prefixNoMaskLen(), sensitive.suffixNoMaskLen(), sensitive.maskStr());
+ }
+ }
+ return serializerProvider.findValueSerializer(beanProperty.getType(), beanProperty);
+ }
+ return serializerProvider.findNullValueSerializer(null);
+ }
+}
+
diff --git a/pigx-common/pigx-common-core/src/main/java/com/pig4cloud/pigx/common/core/sensitive/SensitiveTypeEnum.java b/pigx-common/pigx-common-core/src/main/java/com/pig4cloud/pigx/common/core/sensitive/SensitiveTypeEnum.java
new file mode 100644
index 000000000..afb212840
--- /dev/null
+++ b/pigx-common/pigx-common-core/src/main/java/com/pig4cloud/pigx/common/core/sensitive/SensitiveTypeEnum.java
@@ -0,0 +1,70 @@
+/*
+ * Copyright (c) 2018-2025, lengleng All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * Neither the name of the pig4cloud.com developer nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ * Author: lengleng (wangiegie@gmail.com)
+ */
+
+package com.pig4cloud.pigx.common.core.sensitive;
+
+/**
+ * 敏感信息枚举类
+ *
+ * @author mayee
+ * @version v1.0
+ **/
+public enum SensitiveTypeEnum {
+
+ /**
+ * 自定义
+ */
+ CUSTOMER,
+ /**
+ * 用户名, 刘*华, 徐*
+ */
+ CHINESE_NAME,
+ /**
+ * 身份证号, 110110********1234
+ */
+ ID_CARD,
+ /**
+ * 座机号, ****1234
+ */
+ FIXED_PHONE,
+ /**
+ * 手机号, 176****1234
+ */
+ MOBILE_PHONE,
+ /**
+ * 地址, 北京********
+ */
+ ADDRESS,
+ /**
+ * 电子邮件, s*****o@xx.com
+ */
+ EMAIL,
+ /**
+ * 银行卡, 622202************1234
+ */
+ BANK_CARD,
+ /**
+ * 密码, 永远是 ******, 与长度无关
+ */
+ PASSWORD,
+ /**
+ * 密钥, 永远是 ******, 与长度无关
+ */
+ KEY;
+
+
+}
diff --git a/pigx-common/pigx-common-core/src/main/java/com/pig4cloud/pigx/common/core/util/DesensitizedUtils.java b/pigx-common/pigx-common-core/src/main/java/com/pig4cloud/pigx/common/core/util/DesensitizedUtils.java
new file mode 100644
index 000000000..3724496e2
--- /dev/null
+++ b/pigx-common/pigx-common-core/src/main/java/com/pig4cloud/pigx/common/core/util/DesensitizedUtils.java
@@ -0,0 +1,181 @@
+/*
+ * Copyright (c) 2018-2025, lengleng All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * Neither the name of the pig4cloud.com developer nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ * Author: lengleng (wangiegie@gmail.com)
+ */
+
+package com.pig4cloud.pigx.common.core.util;
+
+
+import org.apache.commons.lang.StringUtils;
+
+/**
+ * 脱敏工具类
+ *
+ * @author mayee
+ * @version v1.0
+ **/
+public class DesensitizedUtils {
+
+ /**
+ * 对字符串进行脱敏操作
+ *
+ * @param origin 原始字符串
+ * @param prefixNoMaskLen 左侧需要保留几位明文字段
+ * @param suffixNoMaskLen 右侧需要保留几位明文字段
+ * @param maskStr 用于遮罩的字符串, 如'*'
+ * @return 脱敏后结果
+ */
+ public static String desValue(String origin, int prefixNoMaskLen, int suffixNoMaskLen, String maskStr) {
+ if (origin == null) {
+ return null;
+ }
+
+ StringBuilder sb = new StringBuilder();
+ for (int i = 0, n = origin.length(); i < n; i++) {
+ if (i < prefixNoMaskLen) {
+ sb.append(origin.charAt(i));
+ continue;
+ }
+ if (i > (n - suffixNoMaskLen - 1)) {
+ sb.append(origin.charAt(i));
+ continue;
+ }
+ sb.append(maskStr);
+ }
+ return sb.toString();
+ }
+
+ /**
+ * 【中文姓名】只显示最后一个汉字,其他隐藏为星号,比如:**梦
+ *
+ * @param fullName 姓名
+ * @return 结果
+ */
+ public static String chineseName(String fullName) {
+ if (fullName == null) {
+ return null;
+ }
+ return desValue(fullName, 0, 1, "*");
+ }
+
+ /**
+ * 【身份证号】显示前六位, 四位,其他隐藏。共计18位或者15位,比如:340304*******1234
+ *
+ * @param id 身份证号码
+ * @return 结果
+ */
+ public static String idCardNum(String id) {
+ return desValue(id, 6, 4, "*");
+ }
+
+ /**
+ * 【固定电话】后四位,其他隐藏,比如 ****1234
+ *
+ * @param num 固定电话
+ * @return 结果
+ */
+ public static String fixedPhone(String num) {
+ return desValue(num, 0, 4, "*");
+ }
+
+ /**
+ * 【手机号码】前三位,后四位,其他隐藏,比如135****6810
+ *
+ * @param num 手机号码
+ * @return 结果
+ */
+ public static String mobilePhone(String num) {
+ return desValue(num, 3, 4, "*");
+ }
+
+ /**
+ * 【地址】只显示到地区,不显示详细地址,比如:北京市海淀区****
+ *
+ * @param address 地址
+ * @return 结果
+ */
+ public static String address(String address) {
+ return desValue(address, 6, 0, "*");
+ }
+
+ /**
+ * 【电子邮箱 邮箱前缀仅显示第一个字母,前缀其他隐藏,用星号代替,@及后面的地址显示,比如:d**@126.com
+ *
+ * @param email 电子邮箱
+ * @return 结果
+ */
+ public static String email(String email) {
+ if (email == null) {
+ return null;
+ }
+ int index = StringUtils.indexOf(email, "@");
+ if (index <= 1) {
+ return email;
+ }
+ String preEmail = desValue(email.substring(0, index), 1, 0, "*");
+ return preEmail + email.substring(index);
+
+ }
+
+ /**
+ * 【银行卡号】前六位,后四位,其他用星号隐藏每位1个星号,比如:622260**********1234
+ *
+ * @param cardNum 银行卡号
+ * @return 结果
+ */
+ public static String bankCard(String cardNum) {
+ return desValue(cardNum, 6, 4, "*");
+ }
+
+ /**
+ * 【密码】密码的全部字符都用*代替,比如:******
+ *
+ * @param password 密码
+ * @return 结果
+ */
+ public static String password(String password) {
+ if (password == null) {
+ return null;
+ }
+ return "******";
+ }
+
+ /**
+ * 【密钥】密钥除了最后三位,全部都用*代替,比如:***xdS
+ * 脱敏后长度为6,如果明文长度不足三位,则按实际长度显示,剩余位置补*
+ *
+ * @param key 密钥
+ * @return 结果
+ */
+ public static String key(String key) {
+ if (key == null) {
+ return null;
+ }
+ int viewLength = 6;
+ StringBuilder tmpKey = new StringBuilder(desValue(key, 0, 3, "*"));
+ if (tmpKey.length() > viewLength) {
+ return tmpKey.substring(tmpKey.length() - viewLength);
+ } else if (tmpKey.length() < viewLength) {
+ int buffLength = viewLength - tmpKey.length();
+ for (int i = 0; i < buffLength; i++) {
+ tmpKey.insert(0, "*");
+ }
+ return tmpKey.toString();
+ } else {
+ return tmpKey.toString();
+ }
+ }
+
+}
diff --git a/pigx-common/pigx-common-core/src/main/java/com/pig4cloud/pigx/common/core/xss/RequestWrapper.java b/pigx-common/pigx-common-core/src/main/java/com/pig4cloud/pigx/common/core/xss/RequestWrapper.java
new file mode 100644
index 000000000..3ab28bf8b
--- /dev/null
+++ b/pigx-common/pigx-common-core/src/main/java/com/pig4cloud/pigx/common/core/xss/RequestWrapper.java
@@ -0,0 +1,141 @@
+/*
+ * Copyright (c) 2018-2025, lengleng All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * Neither the name of the pig4cloud.com developer nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ * Author: lengleng (wangiegie@gmail.com)
+ */
+
+package com.pig4cloud.pigx.common.core.xss;
+
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.util.ObjectUtils;
+import org.springframework.util.StreamUtils;
+import org.springframework.web.util.HtmlUtils;
+
+import javax.servlet.ReadListener;
+import javax.servlet.ServletInputStream;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletRequestWrapper;
+import java.io.BufferedReader;
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.io.InputStreamReader;
+
+/**
+ * @author lengleng
+ * @date 2019-08-13
+ *
+ * 1. XSS过滤
+ * 2. body重复读
+ */
+@Slf4j
+public class RequestWrapper extends HttpServletRequestWrapper {
+ private final byte[] body;
+
+ RequestWrapper(HttpServletRequest request) {
+ super(request);
+ this.body = getByteBody(request);
+ }
+
+ @Override
+ public BufferedReader getReader() {
+ return ObjectUtils.isEmpty(body) ? null
+ : new BufferedReader(new InputStreamReader(getInputStream()));
+ }
+
+ @Override
+ public ServletInputStream getInputStream() {
+ final ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream(body);
+ return new ServletInputStream() {
+ @Override
+ public boolean isFinished() {
+ return false;
+ }
+
+ @Override
+ public boolean isReady() {
+ return false;
+ }
+
+ @Override
+ public void setReadListener(ReadListener readListener) {
+
+ }
+
+ @Override
+ public int read() {
+ return byteArrayInputStream.read();
+ }
+ };
+ }
+
+ @Override
+ public String[] getParameterValues(String name) {
+ String[] values = super.getParameterValues(name);
+ if (values == null) {
+ return null;
+ }
+ int count = values.length;
+ String[] encodedValues = new String[count];
+ for (int i = 0; i < count; i++) {
+ encodedValues[i] = HtmlUtils.htmlEscape(values[i]);
+ }
+ return encodedValues;
+ }
+
+ @Override
+ public String getParameter(String name) {
+ String value = super.getParameter(name);
+ if (value == null) {
+ return null;
+ }
+ return HtmlUtils.htmlEscape(value);
+ }
+
+ @Override
+ public Object getAttribute(String name) {
+ Object value = super.getAttribute(name);
+ if (value instanceof String) {
+ HtmlUtils.htmlEscape((String) value);
+ }
+ return value;
+ }
+
+ @Override
+ public String getHeader(String name) {
+ String value = super.getHeader(name);
+ if (value == null) {
+ return null;
+ }
+ return HtmlUtils.htmlEscape(value);
+ }
+
+ @Override
+ public String getQueryString() {
+ String value = super.getQueryString();
+ if (value == null) {
+ return null;
+ }
+ return HtmlUtils.htmlEscape(value);
+ }
+
+ private static byte[] getByteBody(HttpServletRequest request) {
+ byte[] body = new byte[0];
+ try {
+ body = StreamUtils.copyToByteArray(request.getInputStream());
+ } catch (IOException e) {
+ log.error("解析流中数据异常", e);
+ }
+ return body;
+ }
+}
diff --git a/pigx-common/pigx-common-core/src/main/java/com/pig4cloud/pigx/common/core/xss/RequestWrapperFilter.java b/pigx-common/pigx-common-core/src/main/java/com/pig4cloud/pigx/common/core/xss/RequestWrapperFilter.java
new file mode 100644
index 000000000..a85833b4d
--- /dev/null
+++ b/pigx-common/pigx-common-core/src/main/java/com/pig4cloud/pigx/common/core/xss/RequestWrapperFilter.java
@@ -0,0 +1,44 @@
+/*
+ * Copyright (c) 2018-2025, lengleng All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * Neither the name of the pig4cloud.com developer nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ * Author: lengleng (wangiegie@gmail.com)
+ */
+
+package com.pig4cloud.pigx.common.core.xss;
+
+import org.springframework.lang.NonNull;
+import org.springframework.web.filter.OncePerRequestFilter;
+
+import javax.servlet.FilterChain;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+
+/**
+ * @author lengleng
+ * @date 2019-08-13
+ *
+ * request 处理过滤器
+ */
+public class RequestWrapperFilter extends OncePerRequestFilter {
+
+ @Override
+ protected void doFilterInternal(@NonNull HttpServletRequest request,
+ @NonNull HttpServletResponse response,
+ @NonNull FilterChain filterChain)
+ throws ServletException, IOException {
+ filterChain.doFilter(new RequestWrapper(request), response);
+ }
+}
\ No newline at end of file
diff --git a/pigx-common/pigx-common-core/src/main/resources/META-INF/spring.factories b/pigx-common/pigx-common-core/src/main/resources/META-INF/spring.factories
index 8bdf5ad3b..9499b6652 100644
--- a/pigx-common/pigx-common-core/src/main/resources/META-INF/spring.factories
+++ b/pigx-common/pigx-common-core/src/main/resources/META-INF/spring.factories
@@ -2,4 +2,5 @@ org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
com.pig4cloud.pigx.common.core.config.JacksonConfig,\
com.pig4cloud.pigx.common.core.config.MessageSourceConfig,\
com.pig4cloud.pigx.common.core.config.RestTemplateConfig,\
- com.pig4cloud.pigx.common.core.util.SpringContextHolder
+ com.pig4cloud.pigx.common.core.util.SpringContextHolder,\
+ com.pig4cloud.pigx.common.core.xss.RequestWrapperFilter
diff --git a/pigx-common/pigx-common-datasource/src/main/java/com/pig4cloud/pigx/common/datasource/support/DataSourceConstants.java b/pigx-common/pigx-common-datasource/src/main/java/com/pig4cloud/pigx/common/datasource/support/DataSourceConstants.java
index 7c9502ad6..af57b82fc 100644
--- a/pigx-common/pigx-common-datasource/src/main/java/com/pig4cloud/pigx/common/datasource/support/DataSourceConstants.java
+++ b/pigx-common/pigx-common-datasource/src/main/java/com/pig4cloud/pigx/common/datasource/support/DataSourceConstants.java
@@ -10,7 +10,7 @@ public interface DataSourceConstants {
/**
* 查询数据源的SQL
*/
- String QUERY_DS_SQL = "select * from sys_datasource_conf where del_flag = 0";
+ String QUERY_DS_SQL = "select * from gen_datasource_conf where del_flag = 0";
/**
* 动态路由KEY
diff --git a/pigx-common/pigx-common-gateway/src/main/java/com/pig4cloud/pigx/common/gateway/cache/DynamicRouteCacheListener.java b/pigx-common/pigx-common-gateway/src/main/java/com/pig4cloud/pigx/common/gateway/cache/DynamicRouteCacheListener.java
new file mode 100644
index 000000000..71a30ac04
--- /dev/null
+++ b/pigx-common/pigx-common-gateway/src/main/java/com/pig4cloud/pigx/common/gateway/cache/DynamicRouteCacheListener.java
@@ -0,0 +1,50 @@
+/*
+ * Copyright (c) 2018-2025, lengleng All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * Neither the name of the pig4cloud.com developer nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ * Author: lengleng (wangiegie@gmail.com)
+ */
+
+package com.pig4cloud.pigx.common.gateway.cache;
+
+import lombok.AllArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.data.redis.connection.Message;
+import org.springframework.data.redis.connection.MessageListener;
+import org.springframework.data.redis.core.RedisTemplate;
+import org.springframework.stereotype.Component;
+
+/**
+ * @author lengleng
+ * @date 2019-08-16
+ *
+ * redis 消息订阅
+ */
+@Slf4j
+@Component
+@AllArgsConstructor
+public class DynamicRouteCacheListener implements MessageListener {
+ private final RedisTemplate redisTemplate;
+
+ @Override
+ public void onMessage(Message message, byte[] bytes) {
+ byte[] body = message.getBody();
+ byte[] channel = message.getChannel();
+ String msg = redisTemplate.getStringSerializer().deserialize(body);
+ String topic = redisTemplate.getStringSerializer().deserialize(channel);
+
+ log.info("监听到 {} , 消息内容为 {}", msg, topic);
+ RouteCacheUtil.removeRouteList();
+ }
+
+}
diff --git a/pigx-common/pigx-common-gateway/src/main/java/com/pig4cloud/pigx/common/gateway/cache/RouteCacheUtil.java b/pigx-common/pigx-common-gateway/src/main/java/com/pig4cloud/pigx/common/gateway/cache/RouteCacheUtil.java
new file mode 100644
index 000000000..e71cc2a64
--- /dev/null
+++ b/pigx-common/pigx-common-gateway/src/main/java/com/pig4cloud/pigx/common/gateway/cache/RouteCacheUtil.java
@@ -0,0 +1,67 @@
+/*
+ * Copyright (c) 2018-2025, lengleng All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * Neither the name of the pig4cloud.com developer nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ * Author: lengleng (wangiegie@gmail.com)
+ */
+
+package com.pig4cloud.pigx.common.gateway.cache;
+
+import cn.hutool.cache.Cache;
+import cn.hutool.cache.CacheUtil;
+import com.pig4cloud.pigx.common.gateway.vo.RouteDefinitionVo;
+import lombok.experimental.UtilityClass;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @author lengleng
+ * @date 2019-08-16
+ *