mirror of
https://gitee.com/mirrors/Spring-Cloud-Alibaba.git
synced 2021-06-26 13:25:11 +08:00
43 lines
1.2 KiB
Plaintext
43 lines
1.2 KiB
Plaintext
== 依赖管理
|
||
|
||
Spring Cloud Alibaba BOM 包含了它所使用的所有依赖的版本。
|
||
|
||
### Spring Cloud Alibaba Bill of Materials (BOM)
|
||
|
||
如果您是 Maven Central 用户,请将我们的 BOM 添加到您的 pom.xml 中的 <dependencyManagement> 部分。 这将允许您省略任何Maven依赖项的版本,而是将版本控制委派给BOM。
|
||
|
||
```xml
|
||
<dependencyManagement>
|
||
<dependencies>
|
||
<dependency>
|
||
<groupId>org.springframework.cloud</groupId>
|
||
<artifactId>spring-cloud-alibaba-dependencies</artifactId>
|
||
<version>2.1.0.RELEASE</version>
|
||
<type>pom</type>
|
||
<scope>import</scope>
|
||
</dependency>
|
||
</dependencies>
|
||
</dependencyManagement>
|
||
```
|
||
|
||
### Spring Snapshots Maven Repository
|
||
|
||
如果要使用最新的 BUILD-SNAPSHOT 版本,请在 pom.xml 中添加 Spring Snapshot Repository,注意:BUILD-SNAPSHOT随时可能更新:
|
||
|
||
```xml
|
||
<repositories>
|
||
<repository>
|
||
<id>spring-snapshots</id>
|
||
<name>Spring SnapShots</name>
|
||
<url>https://repo.spring.io/libs-snapshot</url>
|
||
<snapshots>
|
||
<enabled>true</enabled>
|
||
</snapshots>
|
||
</repository>
|
||
</repositories>
|
||
```
|
||
|
||
举个例子, 0.2.0.BUILD-SNAPSHOT 版本就在这个仓库中可用。
|
||
|
||
|