这里的新手。Spring模块2.6.1版本的pom文件可以在https://repo1.maven.org/maven2/org/springframework/data/spring-data-redis/2.6.1/spring-data-redis-2.6.1.pom上找到。spring-aop和其他一些Spring模块没有在文件中指定版本,但是当我查看依赖树时,版本是5.3.15。
那么指定的版本在哪里呢?
发布于 2022-01-25 00:27:35
他们来自父母,也就是org.springframework.data.build:spring-data-parent:2.6.1。该POM包含一个部分
<properties>
…
<spring>5.3.15</spring>
…
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-framework-bom</artifactId>
<version>${spring}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
…
</dependencies>
</dependencyManagement>spring-framework-bom,称为物料清单 (AKA ),拥有各种Spring库的所有版本。
当您在项目中导入BOM时,它的dependencyManagement部分中列出的版本将成为一种推荐:如果没有指定其他版本,则将使用它们:
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-aop</artifactId>
<version>5.3.15</version>
</dependency>
</dependencies>
…
</dependencyManagement>https://stackoverflow.com/questions/70841757
复制相似问题