[英]Why you don't need to specify the version for some dependencies in Spring Boot project?
I'm learning about Spring Boot and I see that you don't need to specify the version for some dependencies, but you need to specify the version for other dependencies.我正在学习 Spring Boot ,我看到您不需要为某些依赖项指定版本,但您需要为其他依赖项指定版本。 Where does the version of this dependencies comes from?
这个依赖的版本来自哪里?
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.6.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>com.dgs</groupId>
<artifactId>n-tier-and-jackson</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>n-tier-and-jackson</name>
<description>Demo project for Spring Boot</description>
<properties>
<java.version>1.8</java.version>
<paypal.rest.easy.version>2.3.3-RELEASE</paypal.rest.easy.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jersey</artifactId>
</dependency>
<dependency>
<groupId>com.paypal.springboot</groupId>
<artifactId>resteasy-spring-boot-starter</artifactId>
<version>${paypal.rest.easy.version}</version>
</dependency>
...
For example in this code you don't need to specify the version for spring-boot-starter-jersey, but you need to specify the version for resteasy-spring-boot-starter.例如,在此代码中,您无需为 spring-boot-starter-jersey 指定版本,但您需要为 resteasy-spring-boot-starter 指定版本。 Where does the version for spring-boot-starter-jersey comes from?
spring-boot-starter-jersey 的版本来自哪里? Thank you!
谢谢!
Dependencies versions are declared in the pom file that you have specified in the parent section of your pom file依赖版本在您在 pom 文件的 parent 部分中指定的 pom 文件中声明
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.