2025-12-02 18:46:03 +08:00
|
|
|
|
<?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.xyzh</groupId>
|
|
|
|
|
|
<artifactId>urban-lifeline</artifactId>
|
|
|
|
|
|
<version>1.0.0</version>
|
|
|
|
|
|
</parent>
|
|
|
|
|
|
|
|
|
|
|
|
<groupId>org.xyzh</groupId>
|
|
|
|
|
|
<artifactId>gateway</artifactId>
|
|
|
|
|
|
<version>${urban-lifeline.version}</version>
|
|
|
|
|
|
|
|
|
|
|
|
<properties>
|
|
|
|
|
|
<maven.compiler.source>21</maven.compiler.source>
|
|
|
|
|
|
<maven.compiler.target>21</maven.compiler.target>
|
|
|
|
|
|
</properties>
|
|
|
|
|
|
|
|
|
|
|
|
<dependencies>
|
|
|
|
|
|
<!-- Spring Cloud Gateway -->
|
|
|
|
|
|
<dependency>
|
|
|
|
|
|
<groupId>org.springframework.cloud</groupId>
|
|
|
|
|
|
<artifactId>spring-cloud-starter-gateway</artifactId>
|
2025-12-05 15:34:02 +08:00
|
|
|
|
<exclusions>
|
|
|
|
|
|
<exclusion>
|
|
|
|
|
|
<groupId>org.springframework.boot</groupId>
|
|
|
|
|
|
<artifactId>spring-boot-starter-logging</artifactId>
|
|
|
|
|
|
</exclusion>
|
|
|
|
|
|
<!-- 排除旧的 gateway-server,使用新的 webflux 版本 -->
|
|
|
|
|
|
<exclusion>
|
|
|
|
|
|
<groupId>org.springframework.cloud</groupId>
|
|
|
|
|
|
<artifactId>spring-cloud-gateway-server</artifactId>
|
|
|
|
|
|
</exclusion>
|
|
|
|
|
|
</exclusions>
|
|
|
|
|
|
</dependency>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 明确使用新的 WebFlux Gateway Server(推荐) -->
|
|
|
|
|
|
<dependency>
|
|
|
|
|
|
<groupId>org.springframework.cloud</groupId>
|
|
|
|
|
|
<artifactId>spring-cloud-gateway-server-webflux</artifactId>
|
2025-12-02 18:46:03 +08:00
|
|
|
|
</dependency>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- Nacos 服务注册与发现 -->
|
|
|
|
|
|
<dependency>
|
|
|
|
|
|
<groupId>com.alibaba.cloud</groupId>
|
|
|
|
|
|
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
|
2025-12-05 15:34:02 +08:00
|
|
|
|
<exclusions>
|
|
|
|
|
|
<exclusion>
|
|
|
|
|
|
<groupId>org.springframework.boot</groupId>
|
|
|
|
|
|
<artifactId>spring-boot-starter-logging</artifactId>
|
|
|
|
|
|
</exclusion>
|
|
|
|
|
|
<exclusion>
|
|
|
|
|
|
<groupId>com.alibaba.nacos</groupId>
|
|
|
|
|
|
<artifactId>nacos-logback-adapter-12</artifactId>
|
|
|
|
|
|
</exclusion>
|
|
|
|
|
|
<exclusion>
|
|
|
|
|
|
<groupId>com.alibaba.nacos</groupId>
|
|
|
|
|
|
<artifactId>logback-adapter</artifactId>
|
|
|
|
|
|
</exclusion>
|
|
|
|
|
|
</exclusions>
|
2025-12-02 18:46:03 +08:00
|
|
|
|
</dependency>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- Nacos 配置中心 -->
|
|
|
|
|
|
<dependency>
|
|
|
|
|
|
<groupId>com.alibaba.cloud</groupId>
|
|
|
|
|
|
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
|
2025-12-05 15:34:02 +08:00
|
|
|
|
<exclusions>
|
|
|
|
|
|
<exclusion>
|
|
|
|
|
|
<groupId>org.springframework.boot</groupId>
|
|
|
|
|
|
<artifactId>spring-boot-starter-logging</artifactId>
|
|
|
|
|
|
</exclusion>
|
|
|
|
|
|
<exclusion>
|
|
|
|
|
|
<groupId>com.alibaba.nacos</groupId>
|
|
|
|
|
|
<artifactId>nacos-logback-adapter-12</artifactId>
|
|
|
|
|
|
</exclusion>
|
|
|
|
|
|
<exclusion>
|
|
|
|
|
|
<groupId>com.alibaba.nacos</groupId>
|
|
|
|
|
|
<artifactId>logback-adapter</artifactId>
|
|
|
|
|
|
</exclusion>
|
|
|
|
|
|
</exclusions>
|
2025-12-02 18:46:03 +08:00
|
|
|
|
</dependency>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 负载均衡 -->
|
|
|
|
|
|
<dependency>
|
|
|
|
|
|
<groupId>org.springframework.cloud</groupId>
|
|
|
|
|
|
<artifactId>spring-cloud-starter-loadbalancer</artifactId>
|
|
|
|
|
|
</dependency>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 认证模块(JWT验证) -->
|
|
|
|
|
|
<dependency>
|
|
|
|
|
|
<groupId>org.xyzh.common</groupId>
|
|
|
|
|
|
<artifactId>common-auth</artifactId>
|
|
|
|
|
|
</dependency>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- Redis(用于Token验证、限流等) -->
|
|
|
|
|
|
<dependency>
|
|
|
|
|
|
<groupId>org.xyzh.common</groupId>
|
|
|
|
|
|
<artifactId>common-redis</artifactId>
|
|
|
|
|
|
</dependency>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 工具类 -->
|
|
|
|
|
|
<dependency>
|
|
|
|
|
|
<groupId>org.xyzh.common</groupId>
|
|
|
|
|
|
<artifactId>common-utils</artifactId>
|
|
|
|
|
|
</dependency>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 核心模块 -->
|
|
|
|
|
|
<dependency>
|
|
|
|
|
|
<groupId>org.xyzh.common</groupId>
|
|
|
|
|
|
<artifactId>common-core</artifactId>
|
|
|
|
|
|
</dependency>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- Spring Boot Actuator(健康检查) -->
|
|
|
|
|
|
<dependency>
|
|
|
|
|
|
<groupId>org.springframework.boot</groupId>
|
|
|
|
|
|
<artifactId>spring-boot-starter-actuator</artifactId>
|
2025-12-05 15:34:02 +08:00
|
|
|
|
<exclusions>
|
|
|
|
|
|
<exclusion>
|
|
|
|
|
|
<groupId>org.springframework.boot</groupId>
|
|
|
|
|
|
<artifactId>spring-boot-starter-logging</artifactId>
|
|
|
|
|
|
</exclusion>
|
|
|
|
|
|
</exclusions>
|
2025-12-02 18:46:03 +08:00
|
|
|
|
</dependency>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- WebFlux(Gateway依赖) -->
|
|
|
|
|
|
<dependency>
|
|
|
|
|
|
<groupId>org.springframework.boot</groupId>
|
|
|
|
|
|
<artifactId>spring-boot-starter-webflux</artifactId>
|
|
|
|
|
|
</dependency>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 配置处理 -->
|
|
|
|
|
|
<dependency>
|
|
|
|
|
|
<groupId>org.springframework.boot</groupId>
|
|
|
|
|
|
<artifactId>spring-boot-configuration-processor</artifactId>
|
|
|
|
|
|
<optional>true</optional>
|
|
|
|
|
|
</dependency>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- FastJson -->
|
|
|
|
|
|
<dependency>
|
|
|
|
|
|
<groupId>com.alibaba.fastjson2</groupId>
|
|
|
|
|
|
<artifactId>fastjson2</artifactId>
|
|
|
|
|
|
</dependency>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- Lombok -->
|
|
|
|
|
|
<dependency>
|
|
|
|
|
|
<groupId>org.projectlombok</groupId>
|
|
|
|
|
|
<artifactId>lombok</artifactId>
|
|
|
|
|
|
<optional>true</optional>
|
|
|
|
|
|
</dependency>
|
|
|
|
|
|
</dependencies>
|
|
|
|
|
|
|
|
|
|
|
|
<build>
|
|
|
|
|
|
<finalName>${project.artifactId}</finalName>
|
|
|
|
|
|
<plugins>
|
|
|
|
|
|
<plugin>
|
|
|
|
|
|
<groupId>org.springframework.boot</groupId>
|
|
|
|
|
|
<artifactId>spring-boot-maven-plugin</artifactId>
|
|
|
|
|
|
<configuration>
|
|
|
|
|
|
<mainClass>org.xyzh.gateway.GatewayApplication</mainClass>
|
|
|
|
|
|
</configuration>
|
|
|
|
|
|
</plugin>
|
|
|
|
|
|
</plugins>
|
|
|
|
|
|
</build>
|
|
|
|
|
|
</project>
|