Spring boot 为什么子依赖项的父覆盖版本
我有spring boot应用程序:Spring boot 为什么子依赖项的父覆盖版本,spring-boot,maven,dependencies,pom.xml,Spring Boot,Maven,Dependencies,Pom.xml,我有spring boot应用程序: <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>2.3.3.RELEASE</version> </parent> 如何从依赖项而不是从父项使用版本?这些版本在
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.3.3.RELEASE</version>
</parent>
如何从依赖项而不是从父项使用版本?这些版本在
spring boot dependencies
中设置,它是父项的父项
您需要覆盖这些属性
3.12.8
1.3.2
也许更多的取决于你想做什么
您不能忽略这些值而使用依赖项中的值。您需要显式地覆盖它
<dependency>
<groupId>cz.my</groupId>
<artifactId>my-hazelcast-common</artifactId>
</dependency>
[INFO] +- cz.my:my-hazelcast-common:jar:2.1-SNAPSHOT:compile
[INFO] | \- com.hazelcast:hazelcast:jar:3.12.8:compile