Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.

Chapter 6. Upgrading Red Hat build of Apache Camel on Spring Boot version with Camel update recipes


Migrating the code for Apache Camel on Spring Boot often involves adapting to new Camel API changes and renaming the classes. To address this, you can use Camel update recipes based on OpenRewrite. These recipes assists with manual migrations and make it more efficient.

You can update the Red Hat build of Apache Camel on Spring Boot application using Camel JBang. Camel JBang provides the camel update command. It has two main operations:

  • run: Executes the actual update process

The update process uses the Apache Camel Open Rewrite recipes. It supports following application types:

  • Plain Camel (camel-main)
  • Camel Quarkus
  • Camel Spring Boot

Here, Camel and Camel Spring Boot updates mainly use the camel-upgrade-recipes, while Camel Quarkus updates involve both the Quarkus runtime (via Rewrite Quarkus) and Apache Camel recipes.

6.1. Running Camel Updates

To perform the update to this version, use:

$ camel update run {camelSpringBootVersion} --runtime=spring-boot
Note

The update commands must be executed in the project directory that contains the pom.xml file.

6.1.1. Configuration Options

You can customize the update process with several options that are available:

  • --runtime: Specifies the application type:

    • spring-boot - Camel Spring Boot applications
  • --repos: Additional Maven repositories to use during the update
  • --dry-run: Preview the changes without applying them
  • --extraActiveRecipes: Comma-separated list of additional recipe names to apply
  • --extraRecipeArtifactCoordinates: Comma-separated list of Maven coordinates for extra recipes (format: groupId:artifactId:version)
  • --help : To see all available options.

6.1.2. Updating a plain Camel application

Following example shows how to update a plain Camel application.

$ camel update run 4.14.4.redhat-00009 --runtime=camel-main --repos=https://myMaven/repo --extraActiveRecipes=my.first.Recipe,my.second.Recipe --extraRecipeArtifactCoordinates=ex.my.org:recipes:1.0.0

6.1.3. Updating a Spring Boot application

You can use the following command to update a Spring Boot application. You can use the -extraActiveRecipes option to run the extra Spring Boot upgrade.

$ camel update run 4.14.4.redhat-00009 --runtime=spring-boot --extraActiveRecipes=org.openrewrite.java.spring.boot3.UpgradeSpringBoot_3_3 --extraRecipeArtifactCoordinates=org.openrewrite.recipe:rewrite-spring:6.0.2
Red Hat logoGithubredditYoutubeTwitter

Lernen

Testen, kaufen und verkaufen

Communitys

Über Red Hat Dokumentation

Wir helfen Red Hat Benutzern, mit unseren Produkten und Diensten innovativ zu sein und ihre Ziele zu erreichen – mit Inhalten, denen sie vertrauen können. Entdecken Sie unsere neuesten Updates.

Mehr Inklusion in Open Source

Red Hat hat sich verpflichtet, problematische Sprache in unserem Code, unserer Dokumentation und unseren Web-Eigenschaften zu ersetzen. Weitere Einzelheiten finden Sie in Red Hat Blog.

Über Red Hat

Wir liefern gehärtete Lösungen, die es Unternehmen leichter machen, plattform- und umgebungsübergreifend zu arbeiten, vom zentralen Rechenzentrum bis zum Netzwerkrand.

Theme

© 2026 Red Hat
Nach oben