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>
|
|
|
|
|
|
|
2025-12-22 17:03:37 +08:00
|
|
|
|
<!-- Gateway 是 WebFlux 应用,必须排除所有 Servlet/Tomcat 相关依赖 -->
|
|
|
|
|
|
<dependencyManagement>
|
|
|
|
|
|
<dependencies>
|
|
|
|
|
|
<!-- 覆盖父 pom 继承的 spring-boot-starter-web,设为 test scope 使其不参与编译和运行 -->
|
|
|
|
|
|
<dependency>
|
|
|
|
|
|
<groupId>org.springframework.boot</groupId>
|
|
|
|
|
|
<artifactId>spring-boot-starter-web</artifactId>
|
|
|
|
|
|
<version>${spring-boot.version}</version>
|
|
|
|
|
|
<scope>test</scope>
|
|
|
|
|
|
<exclusions>
|
|
|
|
|
|
<exclusion>
|
|
|
|
|
|
<groupId>*</groupId>
|
|
|
|
|
|
<artifactId>*</artifactId>
|
|
|
|
|
|
</exclusion>
|
|
|
|
|
|
</exclusions>
|
|
|
|
|
|
</dependency>
|
|
|
|
|
|
<!-- 覆盖父 pom 继承的 spring-boot-starter-security -->
|
|
|
|
|
|
<dependency>
|
|
|
|
|
|
<groupId>org.springframework.boot</groupId>
|
|
|
|
|
|
<artifactId>spring-boot-starter-security</artifactId>
|
|
|
|
|
|
<version>${spring-boot.version}</version>
|
|
|
|
|
|
<scope>test</scope>
|
|
|
|
|
|
<exclusions>
|
|
|
|
|
|
<exclusion>
|
|
|
|
|
|
<groupId>*</groupId>
|
|
|
|
|
|
<artifactId>*</artifactId>
|
|
|
|
|
|
</exclusion>
|
|
|
|
|
|
</exclusions>
|
|
|
|
|
|
</dependency>
|
|
|
|
|
|
<!-- 覆盖父 pom 继承的 springdoc -->
|
|
|
|
|
|
<dependency>
|
|
|
|
|
|
<groupId>org.springdoc</groupId>
|
|
|
|
|
|
<artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>
|
|
|
|
|
|
<version>${springdoc.version}</version>
|
|
|
|
|
|
<scope>test</scope>
|
|
|
|
|
|
<exclusions>
|
|
|
|
|
|
<exclusion>
|
|
|
|
|
|
<groupId>*</groupId>
|
|
|
|
|
|
<artifactId>*</artifactId>
|
|
|
|
|
|
</exclusion>
|
|
|
|
|
|
</exclusions>
|
|
|
|
|
|
</dependency>
|
|
|
|
|
|
<!-- 排除 Tomcat -->
|
|
|
|
|
|
<dependency>
|
|
|
|
|
|
<groupId>org.springframework.boot</groupId>
|
|
|
|
|
|
<artifactId>spring-boot-starter-tomcat</artifactId>
|
|
|
|
|
|
<version>${spring-boot.version}</version>
|
|
|
|
|
|
<scope>test</scope>
|
|
|
|
|
|
<exclusions>
|
|
|
|
|
|
<exclusion>
|
|
|
|
|
|
<groupId>*</groupId>
|
|
|
|
|
|
<artifactId>*</artifactId>
|
|
|
|
|
|
</exclusion>
|
|
|
|
|
|
</exclusions>
|
|
|
|
|
|
</dependency>
|
|
|
|
|
|
<dependency>
|
|
|
|
|
|
<groupId>org.apache.tomcat.embed</groupId>
|
|
|
|
|
|
<artifactId>tomcat-embed-core</artifactId>
|
|
|
|
|
|
<version>10.1.48</version>
|
|
|
|
|
|
<scope>test</scope>
|
|
|
|
|
|
</dependency>
|
|
|
|
|
|
<dependency>
|
|
|
|
|
|
<groupId>org.apache.tomcat.embed</groupId>
|
|
|
|
|
|
<artifactId>tomcat-embed-el</artifactId>
|
|
|
|
|
|
<version>10.1.48</version>
|
|
|
|
|
|
<scope>test</scope>
|
|
|
|
|
|
</dependency>
|
|
|
|
|
|
<dependency>
|
|
|
|
|
|
<groupId>org.apache.tomcat.embed</groupId>
|
|
|
|
|
|
<artifactId>tomcat-embed-websocket</artifactId>
|
|
|
|
|
|
<version>10.1.48</version>
|
|
|
|
|
|
<scope>test</scope>
|
|
|
|
|
|
</dependency>
|
|
|
|
|
|
<!-- 排除 spring-webmvc -->
|
|
|
|
|
|
<dependency>
|
|
|
|
|
|
<groupId>org.springframework</groupId>
|
|
|
|
|
|
<artifactId>spring-webmvc</artifactId>
|
|
|
|
|
|
<version>${spring-framework.version}</version>
|
|
|
|
|
|
<scope>test</scope>
|
|
|
|
|
|
</dependency>
|
|
|
|
|
|
</dependencies>
|
|
|
|
|
|
</dependencyManagement>
|
|
|
|
|
|
|
2025-12-02 18:46:03 +08:00
|
|
|
|
<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>
|
|
|
|
|
|
</exclusions>
|
|
|
|
|
|
</dependency>
|
2025-12-02 18:46:03 +08:00
|
|
|
|
|
|
|
|
|
|
<!-- 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>
|
2025-12-22 17:03:37 +08:00
|
|
|
|
<exclusions>
|
|
|
|
|
|
<!-- 排除Tomcat,Gateway必须使用Netty -->
|
|
|
|
|
|
<exclusion>
|
|
|
|
|
|
<groupId>org.springframework.boot</groupId>
|
|
|
|
|
|
<artifactId>spring-boot-starter-web</artifactId>
|
|
|
|
|
|
</exclusion>
|
|
|
|
|
|
<exclusion>
|
|
|
|
|
|
<groupId>org.springframework.boot</groupId>
|
|
|
|
|
|
<artifactId>spring-boot-starter-tomcat</artifactId>
|
|
|
|
|
|
</exclusion>
|
|
|
|
|
|
<exclusion>
|
|
|
|
|
|
<groupId>org.apache.tomcat.embed</groupId>
|
|
|
|
|
|
<artifactId>tomcat-embed-core</artifactId>
|
|
|
|
|
|
</exclusion>
|
|
|
|
|
|
</exclusions>
|
2025-12-02 18:46:03 +08:00
|
|
|
|
</dependency>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- Redis(用于Token验证、限流等) -->
|
|
|
|
|
|
<dependency>
|
|
|
|
|
|
<groupId>org.xyzh.common</groupId>
|
|
|
|
|
|
<artifactId>common-redis</artifactId>
|
2025-12-22 17:03:37 +08:00
|
|
|
|
<exclusions>
|
|
|
|
|
|
<exclusion>
|
|
|
|
|
|
<groupId>org.springframework.boot</groupId>
|
|
|
|
|
|
<artifactId>spring-boot-starter-web</artifactId>
|
|
|
|
|
|
</exclusion>
|
|
|
|
|
|
<exclusion>
|
|
|
|
|
|
<groupId>org.springframework.boot</groupId>
|
|
|
|
|
|
<artifactId>spring-boot-starter-tomcat</artifactId>
|
|
|
|
|
|
</exclusion>
|
|
|
|
|
|
<exclusion>
|
|
|
|
|
|
<groupId>org.apache.tomcat.embed</groupId>
|
|
|
|
|
|
<artifactId>tomcat-embed-core</artifactId>
|
|
|
|
|
|
</exclusion>
|
|
|
|
|
|
</exclusions>
|
2025-12-02 18:46:03 +08:00
|
|
|
|
</dependency>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 工具类 -->
|
2025-12-22 17:03:37 +08:00
|
|
|
|
<!-- <dependency>
|
2025-12-02 18:46:03 +08:00
|
|
|
|
<groupId>org.xyzh.common</groupId>
|
|
|
|
|
|
<artifactId>common-utils</artifactId>
|
2025-12-22 17:03:37 +08:00
|
|
|
|
<exclusions>
|
|
|
|
|
|
<exclusion>
|
|
|
|
|
|
<groupId>org.springframework.boot</groupId>
|
|
|
|
|
|
<artifactId>spring-boot-starter-web</artifactId>
|
|
|
|
|
|
</exclusion>
|
|
|
|
|
|
<exclusion>
|
|
|
|
|
|
<groupId>org.springframework.boot</groupId>
|
|
|
|
|
|
<artifactId>spring-boot-starter-tomcat</artifactId>
|
|
|
|
|
|
</exclusion>
|
|
|
|
|
|
<exclusion>
|
|
|
|
|
|
<groupId>org.apache.tomcat.embed</groupId>
|
|
|
|
|
|
<artifactId>tomcat-embed-core</artifactId>
|
|
|
|
|
|
</exclusion>
|
|
|
|
|
|
</exclusions>
|
|
|
|
|
|
</dependency> -->
|
2025-12-02 18:46:03 +08:00
|
|
|
|
|
|
|
|
|
|
<!-- 核心模块 -->
|
|
|
|
|
|
<dependency>
|
|
|
|
|
|
<groupId>org.xyzh.common</groupId>
|
|
|
|
|
|
<artifactId>common-core</artifactId>
|
2025-12-22 17:03:37 +08:00
|
|
|
|
<exclusions>
|
|
|
|
|
|
<exclusion>
|
|
|
|
|
|
<groupId>org.springframework.boot</groupId>
|
|
|
|
|
|
<artifactId>spring-boot-starter-web</artifactId>
|
|
|
|
|
|
</exclusion>
|
|
|
|
|
|
<exclusion>
|
|
|
|
|
|
<groupId>org.springframework.boot</groupId>
|
|
|
|
|
|
<artifactId>spring-boot-starter-tomcat</artifactId>
|
|
|
|
|
|
</exclusion>
|
|
|
|
|
|
<exclusion>
|
|
|
|
|
|
<groupId>org.apache.tomcat.embed</groupId>
|
|
|
|
|
|
<artifactId>tomcat-embed-core</artifactId>
|
|
|
|
|
|
</exclusion>
|
|
|
|
|
|
</exclusions>
|
2025-12-02 18:46:03 +08:00
|
|
|
|
</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>
|
2025-12-22 17:03:37 +08:00
|
|
|
|
|
|
|
|
|
|
<!-- Gateway 需要 WebFlux 版本的 Spring Security -->
|
|
|
|
|
|
<dependency>
|
|
|
|
|
|
<groupId>org.springframework.security</groupId>
|
|
|
|
|
|
<artifactId>spring-security-config</artifactId>
|
|
|
|
|
|
</dependency>
|
|
|
|
|
|
<dependency>
|
|
|
|
|
|
<groupId>org.springframework.security</groupId>
|
|
|
|
|
|
<artifactId>spring-security-web</artifactId>
|
|
|
|
|
|
</dependency>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- Servlet API (provided - 仅用于编译 common-auth 中的类,运行时不需要) -->
|
|
|
|
|
|
<dependency>
|
|
|
|
|
|
<groupId>jakarta.servlet</groupId>
|
|
|
|
|
|
<artifactId>jakarta.servlet-api</artifactId>
|
|
|
|
|
|
<scope>provided</scope>
|
|
|
|
|
|
</dependency>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- Spring WebMVC (provided - 仅用于编译 common-auth/common-utils 中的类) -->
|
|
|
|
|
|
<dependency>
|
|
|
|
|
|
<groupId>org.springframework</groupId>
|
|
|
|
|
|
<artifactId>spring-webmvc</artifactId>
|
|
|
|
|
|
<scope>provided</scope>
|
|
|
|
|
|
</dependency>
|
2025-12-02 18:46:03 +08:00
|
|
|
|
</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>
|