英文:
How springboot and maven maintain the dependency version?
问题
例如,我想升级jackson-databind版本。使用下面的pom.xml,版本升级到2.15.2,但是我没有定义jackson-databind的版本,只定义了jackson-bom.version。Spring Boot是如何维护它的?即使与Spring相关的jackson版本升级到2.15.2。
想了解原理。
英文:
For example, I want to upgrade the jackson-databind version. With below pom.xml, the version upgrade to 2.15.2, however I do not define the version of jackson-databind. Only define the jackson-bom.version. How springboot maintain it? Even related jackson version of spring upgrade to 2.15.2.
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.1.0</version>
</parent>
<properties>
<jackson-bom.version>2.15.2</jackson-bom.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
</dependency>
</dependencies>
Want to know the principle
答案1
得分: 0
BOM是一个特殊的POM文件,它将已知有效且经过测试可以一起使用的依赖版本进行分组 - Maven中的BOM。Jackson BOM包含了一套完整的一致版本的jackson依赖 - Jackson BOM。
英文:
The BOM is a special POM file that groups dependency versions that are known to be valid and tested to work together - BOM in maven. Jackson BOM contains a complete set of consistent versions of jackson dependencies - Jackson BOM
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论