跳到主要内容

ApiBoot Dependencies

ApiBoot在设计初期借鉴了SpringBoot的目录层级以及整体版本维护,因后期ApiBoot会添加很多第三方依赖,而每个依赖都会进行版本升级,正因为如此ApiBoot独立创建了一个单独的模块api-boot-dependencies用于统一管理各个第三方依赖ApiBoot StarterApiBoot Plugin等版本信息,方便后期统一升级。

1. 内置SpringBoot 版本依赖

api-boot-denpendencies内置了最新版本的spring-boot-dependencies,如下所示:

<!--版本号属性配置-->
<properties>
<spring.boot.version>2.7.3</spring.boot.version>
</properties>
<!--SpringBoot Dependencies-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>${spring.boot.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>

2. 获取最新版本ApiBoot版本依赖

Maven仓库最新版本:

ApiBoot每一个版本都会上传到Maven Centerl中央仓库,搜索最新版本的ApiBoot,访问

获取最新版本ApiBoot

3. 在你的SpringBoot项目内添加ApiBoot依赖

我们在使用ApiBoot时必不可少的一步就是添加ApiBoot的版本依赖,这样我们在使用ApiBoot Starter时就不需要再对应配置version版本内容,添加依赖到pom.xml配置文件如下所示:

<dependencyManagement>
<dependencies>
<!--ApiBoot版本依赖-->
<dependency>
<groupId>org.minbox.framework</groupId>
<artifactId>api-boot-dependencies</artifactId>
<version>{lastVersion}</version>
<scope>import</scope>
<type>pom</type>
</dependency>
</dependencies>
</dependencyManagement>

{lastVersion}替换为最新版本的ApiBoot版本号即可。