From 34981c30a78e8bbd7791131059a9210f9928b62c Mon Sep 17 00:00:00 2001
From: 刘光辉 <347230014@qq.com>
Date: 星期四, 17 九月 2026 09:24:09 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master' into master

---
 jnpf-gateway/src/main/java/jnpf/util/Ip2RegionUtil.java |   54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 54 insertions(+), 0 deletions(-)

diff --git a/jnpf-gateway/src/main/java/jnpf/util/Ip2RegionUtil.java b/jnpf-gateway/src/main/java/jnpf/util/Ip2RegionUtil.java
new file mode 100644
index 0000000..8603528
--- /dev/null
+++ b/jnpf-gateway/src/main/java/jnpf/util/Ip2RegionUtil.java
@@ -0,0 +1,54 @@
+package jnpf.util;
+
+/**
+ * 缃戝叧涓撶敤鐨� {@code jnpf.util.Ip2RegionUtil} 鏇胯韩锛�2026-08-11锛屽钩鍙拌ˉ涓� #15锛夈��
+ *
+ * <p><b>涓轰粈涔堣鏈夎繖涓被</b>锛氫笂娓告妸銆孖P 褰掑睘鍦板伐鍏风被銆嶅拰銆屽畠鐨勬暟鎹枃浠躲�嶆媶鍦ㄤ簡涓や釜妯″潡閲屸�斺��
+ * <ul>
+ *   <li>绫� {@code jnpf.util.Ip2RegionUtil} 鍦� <b>jnpf-common-core</b>锛坓ateway 缁� jnpf-common-auth 浼犻�掍緷璧栧埌锛�</li>
+ *   <li>瀹冭鐨� {@code ip2region_v4.xdb}(11MB) + {@code ip2region_v6.xdb}(36MB) 鍦� <b>jnpf-common-springaop</b></li>
+ * </ul>
+ * 鑰� gateway 渚濊禆鍓嶈�呫�佷笉渚濊禆鍚庤�咃紙springaop 鏄� servlet 鏍� + Sa-Token servlet 鐗堬紝
+ * 涓� WebFlux 缃戝叧涓嶅彲鍚岃繘绋嬶紝鍔犱笉寰楋級銆備簬鏄� jnpf-common-core 鐨�
+ * {@code CoreAutoConfiguration.afterPropertiesSet()} 閲岄偅鍙�<b>鏃犳潯浠堕鐑皟鐢�</b>锛�
+ * <pre>
+ *     initUserAgent();
+ *     Ip2RegionUtil.getIpRegion(null);   // 浼� null銆佽繑鍥炲�� pop 涓㈠純锛岀函绮逛负浜嗚Е鍙戠被鍔犺浇
+ * </pre>
+ * 灏变細瑙﹀彂鍘熺被鐨� static 鍧楀幓璇婚偅涓や釜涓嶅瓨鍦ㄧ殑 xdb锛屾瘡娆″惎鍔ㄥ浐瀹氬埛涓ゆ潯 ERROR锛�
+ * <pre>
+ *     ERROR jnpf.util.Ip2RegionUtil : failed to load content from `/ip2region/ip2region_v4.xdb`: ...
+ *     ERROR jnpf.util.Ip2RegionUtil : failed to load content from `/ip2region/ip2region_v6.xdb`: ...
+ * </pre>
+ *
+ * <p><b>涓轰粈涔堢敤鏇胯韩鑰屼笉鏄ˉ鏁版嵁鏂囦欢</b>锛氭妸 47MB 鐨� xdb 濉炶繘 gateway 闀滃儚锛�
+ * 鍙负鍠傞ケ涓�鍙ュ弬鏁版槸 {@code null} 鐨勯鐑皟鐢ㄢ�斺�攇ateway 鑷韩鏍规湰涓嶈В鏋愬綊灞炲湴
+ * 锛坽@code AuthFilter} / {@code ReactorUtil} 鍙彇 IP 瀛楃涓诧級锛屽綊灞炲湴瑙f瀽鍙戠敓鍦� cx-platform锛�
+ * 閭h竟鏈� springaop銆亁db 姝e父鍔犺浇銆傞暅鍍忓垰浠� 5219MB 鍘嬪埌 762MB锛屼笉鍊煎綋銆�
+ *
+ * <p><b>琛屼负涓庡師绫诲湪銆寈db 缂哄け銆嶆椂瀹屽叏涓�鑷�</b>锛堝弽缂栬瘧鏍稿杩囷級锛氬師绫诲姞杞藉け璐ュ悗
+ * {@code SEARCHER_4}/{@code SEARCHER_6} 鍧囦负 null锛寋@code getIpRegion} 璧板埌
+ * {@code aconst_null; areturn} 杩斿洖 {@code null}锛寋@code getIp2RegionStr} 瑙� null 鍘熸牱杩斿洖 null銆�
+ * 鎵�浠ユ湰鏇胯韩杩斿洖 null <b>涓嶆槸</b>鏂拌涓猴紝鍙槸鎶娿�岃繑鍥� null 涔嬪墠鍏堝埛涓ゆ潯 ERROR銆嶈繖涓�姝ョ渷鎺変簡銆�
+ *
+ * <p><b>瑕嗙洊鍘熺悊</b>锛歋pring Boot fat jar 鐨� {@code LaunchedClassLoader} 閲�
+ * {@code BOOT-INF/classes/} 浼樺厛浜� {@code BOOT-INF/lib/*.jar}锛屾晠鏈被鍙湪 <b>gateway</b> 鐢熸晥锛�
+ * 鍏朵綑鏈嶅姟鐓у父浣跨敤 jnpf-common-core 閲岀殑鐪熷疄瀹炵幇銆�
+ *
+ * <p><b>鍥炴粴</b>锛氬垹鎺夋湰鏂囦欢鍗冲彲锛堜細閫�鍥炪�屼袱鏉� ERROR + 杩斿洖 null銆嶇殑鍘熺姸鎬侊紝鍔熻兘鏃犲樊鍒級銆�
+ * 璇﹁ tasks/jnpf-platform-patches.md #15銆�
+ *
+ * @author cx-team
+ */
+public class Ip2RegionUtil {
+
+    /** 涓庡師绫诲湪 xdb 缂哄け鏃剁殑杩斿洖鍊间竴鑷达細null銆� */
+    public static String getIpRegion(String ip) {
+        return null;
+    }
+
+    /** 涓庡師绫诲湪 xdb 缂哄け鏃剁殑杩斿洖鍊间竴鑷达細null锛堝師绫诲唴閮ㄥ氨鏄� getIpRegion 杩斿洖 null 鍚庡師鏍烽�忎紶锛夈�� */
+    public static String getIp2RegionStr(String ip) {
+        return null;
+    }
+}

--
Gitblit v1.8.0