elv*_*vis 1 java dependencies maven spring-boot
我正在学习 Spring Boot,我发现您不需要为某些依赖项指定版本,但您需要为其他依赖项指定版本。这个依赖的版本从哪里来?
<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>
...
Run Code Online (Sandbox Code Playgroud)
例如,在此代码中,您不需要指定 spring-boot-starter-jersey 的版本,但需要指定resteasy-spring-boot-starter 的版本。spring-boot-starter-jersey 的版本来自哪里?谢谢你!
依赖项版本在您在 pom 文件的父部分中指定的 pom 文件中声明
| 归档时间: |
|
| 查看次数: |
1911 次 |
| 最近记录: |