1. fund-gateway pom.xml 添加 spring-cloud-starter-alibaba-nacos-discovery 依赖 2. TenantLoadBalancerAutoConfig 使用 @LoadBalancerClients 注解配置 3. TenantAwareLoadBalancer 增加 serviceId null 检查
84 lines
2.8 KiB
XML
84 lines
2.8 KiB
XML
<?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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
|
<modelVersion>4.0.0</modelVersion>
|
|
|
|
<parent>
|
|
<groupId>com.fundplatform</groupId>
|
|
<artifactId>fundplatform</artifactId>
|
|
<version>0.0.1-SNAPSHOT</version>
|
|
</parent>
|
|
|
|
<artifactId>fund-gateway</artifactId>
|
|
<name>fund-gateway</name>
|
|
<description>API Gateway Service</description>
|
|
|
|
<dependencies>
|
|
<dependency>
|
|
<groupId>com.fundplatform</groupId>
|
|
<artifactId>fund-common</artifactId>
|
|
<version>0.0.1-SNAPSHOT</version>
|
|
<exclusions>
|
|
<!-- Gateway 不能与 spring-boot-starter-web 共存 -->
|
|
<exclusion>
|
|
<groupId>org.springframework.boot</groupId>
|
|
<artifactId>spring-boot-starter-web</artifactId>
|
|
</exclusion>
|
|
</exclusions>
|
|
</dependency>
|
|
|
|
<!-- Spring Cloud Gateway -->
|
|
<dependency>
|
|
<groupId>org.springframework.cloud</groupId>
|
|
<artifactId>spring-cloud-starter-gateway</artifactId>
|
|
<version>4.0.0</version>
|
|
</dependency>
|
|
|
|
<!-- Nacos Service Discovery -->
|
|
<dependency>
|
|
<groupId>com.alibaba.cloud</groupId>
|
|
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
|
|
</dependency>
|
|
|
|
<!-- Redis for Rate Limiting & Token Storage -->
|
|
<dependency>
|
|
<groupId>org.springframework.boot</groupId>
|
|
<artifactId>spring-boot-starter-data-redis-reactive</artifactId>
|
|
</dependency>
|
|
|
|
<!-- Sentinel 熔断降级 -->
|
|
<dependency>
|
|
<groupId>com.alibaba.cloud</groupId>
|
|
<artifactId>spring-cloud-starter-alibaba-sentinel</artifactId>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>com.alibaba.cloud</groupId>
|
|
<artifactId>spring-cloud-alibaba-sentinel-gateway</artifactId>
|
|
</dependency>
|
|
|
|
<!-- Jackson JSR310 for Java 8 Date/Time -->
|
|
<dependency>
|
|
<groupId>com.fasterxml.jackson.datatype</groupId>
|
|
<artifactId>jackson-datatype-jsr310</artifactId>
|
|
</dependency>
|
|
|
|
<!-- Logstash Logback Encoder (用于ELK) -->
|
|
<dependency>
|
|
<groupId>net.logstash.logback</groupId>
|
|
<artifactId>logstash-logback-encoder</artifactId>
|
|
<version>7.4</version>
|
|
</dependency>
|
|
</dependencies>
|
|
|
|
<build>
|
|
<plugins>
|
|
<plugin>
|
|
<groupId>org.springframework.boot</groupId>
|
|
<artifactId>spring-boot-maven-plugin</artifactId>
|
|
</plugin>
|
|
</plugins>
|
|
</build>
|
|
|
|
</project>
|