zhangjf 8e4afcd1a5 feat: TenantAwareLoadBalancer 整合 TenantRoutingProperties 配置
问题:TenantRoutingProperties 定义了配置但未被使用

解决方案:
1. TenantAwareLoadBalancer 注入 TenantRoutingProperties
   - 使用配置的 tenantHeader 名称
   - 使用配置的 buildTenantGroup 方法
   - 使用配置的 isSharedService 判断
   - 使用配置的 isFallbackToShared 策略

2. 新增功能
   - 支持 enabled=false 禁用租户路由
   - 共享服务跳过租户过滤
   - 可配置是否回退到共享实例

3. 更新测试适配新构造函数
2026-02-19 21:02:25 +08:00

32 lines
4.8 KiB
Plaintext

2026-02-19 17:24:35.003 [background-preinit] [] INFO org.hibernate.validator.internal.util.Version - HV000001: Hibernate Validator 8.0.1.Final
2026-02-19 17:24:35.123 [main] [] INFO com.fundplatform.gateway.GatewayApplication - Starting GatewayApplication v0.0.1-SNAPSHOT using Java 21 with PID 101722 (/home/along/MyCode/wanjiabuluo/fundplatform/fund-gateway/target/fund-gateway-0.0.1-SNAPSHOT.jar started by along in /home/along/MyCode/wanjiabuluo/fundplatform)
2026-02-19 17:24:35.125 [main] [] INFO com.fundplatform.gateway.GatewayApplication - No active profile set, falling back to 1 default profile: "default"
2026-02-19 17:24:37.012 [main] [] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Multiple Spring Data modules found, entering strict repository configuration mode
2026-02-19 17:24:37.018 [main] [] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Bootstrapping Spring Data Redis repositories in DEFAULT mode.
2026-02-19 17:24:37.083 [main] [] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Finished Spring Data repository scanning in 33 ms. Found 0 Redis repository interfaces.
2026-02-19 17:24:37.527 [main] [] INFO o.springframework.cloud.context.scope.GenericScope - BeanFactory id=930e75f9-1da3-3702-8bfd-279509248342
2026-02-19 17:24:40.971 [main] [] INFO o.s.c.gateway.route.RouteDefinitionRouteLocator - Loaded RoutePredicateFactory [After]
2026-02-19 17:24:40.971 [main] [] INFO o.s.c.gateway.route.RouteDefinitionRouteLocator - Loaded RoutePredicateFactory [Before]
2026-02-19 17:24:40.971 [main] [] INFO o.s.c.gateway.route.RouteDefinitionRouteLocator - Loaded RoutePredicateFactory [Between]
2026-02-19 17:24:40.971 [main] [] INFO o.s.c.gateway.route.RouteDefinitionRouteLocator - Loaded RoutePredicateFactory [Cookie]
2026-02-19 17:24:40.972 [main] [] INFO o.s.c.gateway.route.RouteDefinitionRouteLocator - Loaded RoutePredicateFactory [Header]
2026-02-19 17:24:40.972 [main] [] INFO o.s.c.gateway.route.RouteDefinitionRouteLocator - Loaded RoutePredicateFactory [Host]
2026-02-19 17:24:40.972 [main] [] INFO o.s.c.gateway.route.RouteDefinitionRouteLocator - Loaded RoutePredicateFactory [Method]
2026-02-19 17:24:40.972 [main] [] INFO o.s.c.gateway.route.RouteDefinitionRouteLocator - Loaded RoutePredicateFactory [Path]
2026-02-19 17:24:40.972 [main] [] INFO o.s.c.gateway.route.RouteDefinitionRouteLocator - Loaded RoutePredicateFactory [Query]
2026-02-19 17:24:40.972 [main] [] INFO o.s.c.gateway.route.RouteDefinitionRouteLocator - Loaded RoutePredicateFactory [ReadBody]
2026-02-19 17:24:40.973 [main] [] INFO o.s.c.gateway.route.RouteDefinitionRouteLocator - Loaded RoutePredicateFactory [RemoteAddr]
2026-02-19 17:24:40.973 [main] [] INFO o.s.c.gateway.route.RouteDefinitionRouteLocator - Loaded RoutePredicateFactory [XForwardedRemoteAddr]
2026-02-19 17:24:40.973 [main] [] INFO o.s.c.gateway.route.RouteDefinitionRouteLocator - Loaded RoutePredicateFactory [Weight]
2026-02-19 17:24:40.973 [main] [] INFO o.s.c.gateway.route.RouteDefinitionRouteLocator - Loaded RoutePredicateFactory [CloudFoundryRouteService]
2026-02-19 17:24:41.014 [main] [] INFO c.a.c.s.gateway.scg.SentinelSCGAutoConfiguration - [Sentinel SpringCloudGateway] register SentinelGatewayFilter with order: -2147483648
2026-02-19 17:24:41.367 [main] [] INFO c.a.c.s.gateway.scg.SentinelSCGAutoConfiguration - [Sentinel SpringCloudGateway] register SentinelGatewayBlockExceptionHandler
2026-02-19 17:24:42.265 [main] [] INFO o.s.boot.web.embedded.netty.NettyWebServer - Netty started on port 8000
2026-02-19 17:24:42.632 [main] [] INFO com.fundplatform.gateway.GatewayApplication - Started GatewayApplication in 8.959 seconds (process running for 9.983)
2026-02-19 17:40:24.135 [reactor-http-epoll-2] [] INFO com.fundplatform.gateway.filter.GlobalLogFilter - [5fdf3f751b8f4139a78e8a2dc6b2e73b] Request: GET /sys/api/v1/sys/health from 0:0:0:0:0:0:0:1%0
2026-02-19 17:40:25.205 [reactor-http-epoll-2] [] INFO com.fundplatform.gateway.filter.GlobalLogFilter - [5fdf3f751b8f4139a78e8a2dc6b2e73b] Response: GET /sys/api/v1/sys/health - 200 (1079ms)
2026-02-19 17:40:25.236 [reactor-http-epoll-5] [] INFO com.fundplatform.gateway.filter.GlobalLogFilter - [2360d1dd8d794149a8e1910f9a7f7129] Request: GET /sys/api/v1/sys/health from 0:0:0:0:0:0:0:1%0
2026-02-19 17:40:25.250 [reactor-http-epoll-5] [] INFO com.fundplatform.gateway.filter.GlobalLogFilter - [2360d1dd8d794149a8e1910f9a7f7129] Response: GET /sys/api/v1/sys/health - 200 (14ms)
2026-02-19 17:40:25.284 [reactor-http-epoll-6] [] INFO com.fundplatform.gateway.filter.GlobalLogFilter - [db2b78f4cc3a4c60b6be9dba9e09c5d2] Request: GET /sys/api/v1/sys/health from 0:0:0:0:0:0:0:1%0
2026-02-19 17:40:25.298 [reactor-http-epoll-6] [] INFO com.fundplatform.gateway.filter.GlobalLogFilter - [db2b78f4cc3a4c60b6be9dba9e09c5d2] Response: GET /sys/api/v1/sys/health - 200 (14ms)