fix: Gateway不扫描fund-common避免依赖冲突

This commit is contained in:
zhangjf 2026-02-20 18:04:30 +08:00
parent ef46844bfd
commit 4af7d712cd
10 changed files with 58 additions and 16 deletions

View File

@ -1,4 +1,4 @@
#NOTE: This is a Maven Resolver internal implementation file, its format can be changed without prior notice. #NOTE: This is a Maven Resolver internal implementation file, its format can be changed without prior notice.
#Tue Feb 17 19:14:24 CST 2026 #Fri Feb 20 17:27:25 CST 2026
fund-common-0.0.1-SNAPSHOT.jar>= fund-common-0.0.1-SNAPSHOT.jar>=
fund-common-0.0.1-SNAPSHOT.pom>= fund-common-0.0.1-SNAPSHOT.pom>=

View File

@ -50,6 +50,34 @@
<artifactId>jackson-databind</artifactId> <artifactId>jackson-databind</artifactId>
</dependency> </dependency>
<!-- EasyExcel -->
<dependency>
<groupId>cn.afterturn</groupId>
<artifactId>easypoi-spring-boot-starter</artifactId>
<version>4.4.0</version>
</dependency>
<!-- Lombok -->
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<optional>true</optional>
</dependency>
<!-- Spring Cloud LoadBalancer (租户负载均衡) -->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-loadbalancer</artifactId>
</dependency>
<!-- MyBatis Plus (租户插件) -->
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-extension</artifactId>
<version>3.5.5</version>
<scope>provided</scope>
</dependency>
<!-- Test --> <!-- Test -->
<dependency> <dependency>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>

View File

@ -3,7 +3,7 @@
<groupId>com.fundplatform</groupId> <groupId>com.fundplatform</groupId>
<artifactId>fund-common</artifactId> <artifactId>fund-common</artifactId>
<versioning> <versioning>
<lastUpdated>20260217111414</lastUpdated> <lastUpdated>20260220092715</lastUpdated>
<snapshot> <snapshot>
<localCopy>true</localCopy> <localCopy>true</localCopy>
</snapshot> </snapshot>
@ -11,12 +11,12 @@
<snapshotVersion> <snapshotVersion>
<extension>pom</extension> <extension>pom</extension>
<value>0.0.1-SNAPSHOT</value> <value>0.0.1-SNAPSHOT</value>
<updated>20260217111414</updated> <updated>20260220092715</updated>
</snapshotVersion> </snapshotVersion>
<snapshotVersion> <snapshotVersion>
<extension>jar</extension> <extension>jar</extension>
<value>0.0.1-SNAPSHOT</value> <value>0.0.1-SNAPSHOT</value>
<updated>20260217111414</updated> <updated>20260220092715</updated>
</snapshotVersion> </snapshotVersion>
</snapshotVersions> </snapshotVersions>
</versioning> </versioning>

View File

@ -6,6 +6,6 @@
<versions> <versions>
<version>0.0.1-SNAPSHOT</version> <version>0.0.1-SNAPSHOT</version>
</versions> </versions>
<lastUpdated>20260217111414</lastUpdated> <lastUpdated>20260220092715</lastUpdated>
</versioning> </versioning>
</metadata> </metadata>

View File

@ -1,3 +1,3 @@
#NOTE: This is a Maven Resolver internal implementation file, its format can be changed without prior notice. #NOTE: This is a Maven Resolver internal implementation file, its format can be changed without prior notice.
#Tue Feb 17 19:14:15 CST 2026 #Fri Feb 20 17:13:04 CST 2026
fundplatform-0.0.1-SNAPSHOT.pom>= fundplatform-0.0.1-SNAPSHOT.pom>=

View File

@ -60,6 +60,21 @@
</dependencies> </dependencies>
</dependencyManagement> </dependencyManagement>
<!-- 公共依赖 - 所有模块都需要的依赖 -->
<dependencies>
<!-- Spring Boot Actuator - 健康检查和监控端点 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<!-- Micrometer Prometheus - Prometheus 监控指标暴露 -->
<dependency>
<groupId>io.micrometer</groupId>
<artifactId>micrometer-registry-prometheus</artifactId>
</dependency>
</dependencies>
<!-- 项目内自定义 Maven 仓库配置,避免依赖外部 settings.xml 中的私服配置 --> <!-- 项目内自定义 Maven 仓库配置,避免依赖外部 settings.xml 中的私服配置 -->
<repositories> <repositories>
<!-- 官方中央仓库 --> <!-- 官方中央仓库 -->

View File

@ -3,7 +3,7 @@
<groupId>com.fundplatform</groupId> <groupId>com.fundplatform</groupId>
<artifactId>fundplatform</artifactId> <artifactId>fundplatform</artifactId>
<versioning> <versioning>
<lastUpdated>20260217111414</lastUpdated> <lastUpdated>20260220091303</lastUpdated>
<snapshot> <snapshot>
<localCopy>true</localCopy> <localCopy>true</localCopy>
</snapshot> </snapshot>
@ -11,7 +11,7 @@
<snapshotVersion> <snapshotVersion>
<extension>pom</extension> <extension>pom</extension>
<value>0.0.1-SNAPSHOT</value> <value>0.0.1-SNAPSHOT</value>
<updated>20260217111414</updated> <updated>20260220091303</updated>
</snapshotVersion> </snapshotVersion>
</snapshotVersions> </snapshotVersions>
</versioning> </versioning>

View File

@ -6,6 +6,6 @@
<versions> <versions>
<version>0.0.1-SNAPSHOT</version> <version>0.0.1-SNAPSHOT</version>
</versions> </versions>
<lastUpdated>20260217111414</lastUpdated> <lastUpdated>20260220091303</lastUpdated>
</versioning> </versioning>
</metadata> </metadata>

View File

@ -5,13 +5,12 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient; import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
@SpringBootApplication(scanBasePackages = { @SpringBootApplication(scanBasePackages = {
"com.fundplatform.gateway", "com.fundplatform.gateway"
"com.fundplatform.common.auth", // TokenInfo // 注意Gateway不扫描fund-common的任何包避免依赖冲突
"com.fundplatform.common.context", // TraceContextHolder // - common.auth: TokenService需要RedisService
"com.fundplatform.common.exception", // GlobalExceptionHandler // - common.cache: 需要非响应式RedisTemplate
"com.fundplatform.common.result" // Result class // - common.nacos: 需要Registration bean
// 注意不扫描 common.cache (需要RedisTemplateGateway只有ReactiveRedisTemplate) // - common.web: 使用Servlet API
// 注意不扫描 common.web (使用Servlet APIGateway是WebFlux)
}) })
@EnableDiscoveryClient @EnableDiscoveryClient
public class GatewayApplication { public class GatewayApplication {