【发布时间】:2014-07-20 17:01:12
【问题描述】:
我刚开始学习 spring,我想使用 4.0.4.RELEASE 版本 - 它实际上是 maven 存储库提供的最新版本,所以我的问题在这里: 如果我像这样添加依赖项:
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>4.0.4.RELEASE</version>
-它会自动将所有“基本”模块(如上下文、核心、aop、bean、表达式)添加到我的项目中,但是例如,如果我像这样添加依赖项:
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>4.0.4.RELEASE</version>
-它只会将spring-core jar文件添加到我的项目中,谁能解释我为什么会这样?因为我正在从教程中学习,并且在教程中,这家伙添加了这两个依赖项-> spring-core 和 spring-context,他为什么这样做?他应该只添加spring-context依赖,结果是一样的,谁能解释一下?谢谢:)
【问题讨论】:
-
当前版本实际上是 4.0.5。 mvnrepository.com/artifact/org.springframework/spring-context/…
-
是的,你是对的,但是我的 maven 自动打印了 4.0.4...我不知道为什么
-
我使用
versions:display-dependency-updates目标向我展示更改。你也用过吗?