1.2. 更新 Fuse 项目的 Maven 依赖项
要升级 Spring Boot 的 Fuse 应用程序,请更新项目的 Maven 依赖项。
流程
-
打开项目的
pom.xml
文件。 在项目的
pom.xml
文件中添加 dependenciesManagement
元素(或者,可能在父pom.xml
文件中),如下例所示:Copy to Clipboard Copied! Toggle word wrap Toggle overflow 注意确保也更新您的 Spring Boot 版本。这通常位于
pom.xml
文件中的 Fuse 版本下:<properties> <!-- configure the versions you want to use here --> <fuse.version>7.5.0.fuse-750029-redhat-00002</fuse.version> <spring-boot.version>1.5.19.RELEASE</spring-boot.version> </properties>
<properties> <!-- configure the versions you want to use here --> <fuse.version>7.5.0.fuse-750029-redhat-00002</fuse.version> <spring-boot.version>1.5.19.RELEASE</spring-boot.version> </properties>
Copy to Clipboard Copied! Toggle word wrap Toggle overflow -
保存
pom.xml
文件。
在将 BOM 指定为 pom.xml
文件中的依赖项后,可以在没有指定工件版本 的情况下将 Maven 依赖项添加到 pom.xml
文件中。例如,要为 camel-velocity
组件添加依赖项,您可以在 pom.xml
文件中的 dependencies
元素中添加以下 XML 片段:
<dependency> <groupId>org.apache.camel</groupId> <artifactId>camel-velocity</artifactId> <scope>provided</scope> </dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-velocity</artifactId>
<scope>provided</scope>
</dependency>
注意如何在这个依赖项定义中省略 version
元素。