🐛 修复网关经 blade-common 传递依赖启动失败
fd6563f 为 LenientDateParser 引入的 blade-starter-log(compile scope)
把 blade-core-tool 等整棵依赖树传递给所有依赖 common 的模块。网关
(WebFlux) 的 pom 排除了 spring-boot-starter-web(无 spring-webmvc),
而 blade-core-tool 的自动配置 BladeConverterConfiguration implements
WebMvcConfigurer 且无 @ConditionalOnClass 守卫,Spring 解析该配置类时
抛 FileNotFoundException 导致网关启动即崩。
修复:starter-log 改为 provided —— 编译期 ServiceException 可见,
不再向下游传递。业务服务运行时的 ServiceException 由 blade-core-boot
传递提供,行为不变。
验证:网关以原 classpath 启动成功(Started GateWayApplication in
16.4s);blade-common 与全仓 BUILD SUCCESS。
This commit is contained in:
@@ -25,6 +25,11 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springblade</groupId>
|
<groupId>org.springblade</groupId>
|
||||||
<artifactId>blade-starter-log</artifactId>
|
<artifactId>blade-starter-log</artifactId>
|
||||||
|
<!-- provided:LenientDateParser 编译期需要 ServiceException(位于 starter-log),
|
||||||
|
但 provided 不向下游传递——否则网关会经 common 拿到 blade-core-tool 的
|
||||||
|
BladeConverterConfiguration(implements WebMvcConfigurer),在无 spring-webmvc
|
||||||
|
的 WebFlux 网关里启动即崩。业务服务经 blade-core-boot 自带 starter-log,运行时不受影响。 -->
|
||||||
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springblade</groupId>
|
<groupId>org.springblade</groupId>
|
||||||
|
|||||||
Reference in New Issue
Block a user