在我们使用maven仓库的时候经常会看到version后有一列updates 例如https://mvnrepository.com/artifact/org.mybatis.spring.boot/mybatis-spring-boot-starter/2.1.3
如在maven项目的pom.xml里添加
<dependency>
<groupId>org.mybatis.spring.boot</groupId>
<artifactId>mybatis-spring-boot-starter</artifactId>
<version>2.1.3</version>
</dependency>
则会自动将下边的依赖添加到当前工程
Category/License | Group / Artifact | Version | Updates | |
---|---|---|---|---|
O/R Mapping Apache 2.0 | org.mybatis » mybatis | 3.5.5 | ✔ | |
Apache 2.0 | org.mybatis » mybatis-spring | 2.0.5 | ✔ | |
Apache 2.0 | org.mybatis.spring.boot » mybatis-spring-boot-autoconfigure | 2.1.3 | ✔ | |
Apache 2.0 | org.springframework.boot » spring-boot-starter | 2.3.0.RELEASE | 2.3.4.RELEASE | |
Apache 2.0 | org.springframework.boot » spring-boot-starter-jdbc | 2.3.0.RELEASE | 2.3.4.RELEASE |
version 是mybatis-spring-boot-starter2.1.3版本编译时的依赖项
updates 是依赖项的最新版本号, 如果打对勾则代表是当前依赖项是最新版本
注意:
如果将版本替换为updates里所给的版本号, 可能会出现兼容性问题, 所以项目中最好能保持version列所给的版本号