当前位置:网站首页>关于基础模块中的依赖由微服务中的子模块继承的时候依赖失效的问题
关于基础模块中的依赖由微服务中的子模块继承的时候依赖失效的问题
2022-07-17 10:29:00 【暗号(Live)】
common模块有以下的依赖
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<optional>true</optional>
</dependency>
<!-- 一个Java工具包 -->
<dependency>
<groupId>cn.hutool</groupId>
<artifactId>hutool-all</artifactId>
<version>5.1.0</version>
</dependency>
</dependencies>子模块的依赖如下 :

在此种情况下我们的子模块如果引入了common模块是只能看到hutool这个依赖的!
原因如下:
当其他项目继承本项目时,如果dependences中加上了<optional>true</optional>,表示当前依赖不向下传递。
删除common模块的optional
恢复正常!

边栏推荐
- uniapp仓库管理系统源码
- un7.16:如何在码云上部署项目并邀请组员?
- Classificateur knn
- Fundamentals of C language -- 2-2 const keywords and pointers
- Chapter IX deque of STL
- The inflection point of eth may be just around the corner, which is how to
- Part I - Fundamentals of C language_ 2. Data type
- ArrayList底层分析
- 第十一章 STL 之 queue
- 【Flink】Flink 设置检查点失败一次就报错 setTolerableCheckpointFailureNumber 不起作用
猜你喜欢

Part I - Fundamentals of C language_ 6. Function

第十章 STL 之 stack

Target detection model size calculation, model complexity (parameter conversion formula)

Flink小知识--任务调度slot的配置 slotSharingGroup

The inflection point of eth may be just around the corner, which is how to

565. Array nesting

Part I - Fundamentals of C language_ 1. Overview of C language

第八章 STL 之 vector
![[C language] void type and void* pointer type](/img/4c/3643d850bfcb57db93496ec9bba06e.png)
[C language] void type and void* pointer type

【C语言】整形数据的存储
随机推荐
565. Array nesting
MySQL 用户管理
C语言基础篇 —— 2-2 const关键字与指针
Part I - Fundamentals of C language_ 4. Procedure flow structure
[C language] void type and void* pointer type
Mux256to1v,Hadd,Fadd
v-mode
SharePoint access brief notes
Classification of top essays
MySQL升级为主备,如何同步历史数据?
【性能优化方法论系列】六、总结
Part I - Fundamentals of C language_ 6. Function
R语言data.table导入数据实战:data.table使用dcast.data.table函数实现透视表(pivot table)
[英雄星球七月集训LeetCode解题日报] 第17日 宽搜
Day 6 training
uniapp仓库管理系统源码
2022-07-16:以下go语言代码输出什么?A:[];B:[5];C:[5 0 0 0 0];D:[0 0 0 0 0]。 package main imp
【ACWing】947. 文本编辑器
Componentized advanced -- slot
C语言基础篇 —— 2-3 指针与数组