Skip to main content
Redhat Developers  Logo
  • Products

    Platforms

    • Red Hat Enterprise Linux
      Red Hat Enterprise Linux Icon
    • Red Hat AI
      Red Hat AI
    • Red Hat OpenShift
      Openshift icon
    • Red Hat Ansible Automation Platform
      Ansible icon
    • View All Red Hat Products

    Featured

    • Red Hat build of OpenJDK
    • Red Hat Developer Hub
    • Red Hat JBoss Enterprise Application Platform
    • Red Hat OpenShift Dev Spaces
    • Red Hat OpenShift Local
    • Red Hat Developer Sandbox

      Try Red Hat products and technologies without setup or configuration fees for 30 days with this shared Openshift and Kubernetes cluster.
    • Try at no cost
  • Technologies

    Featured

    • AI/ML
      AI/ML Icon
    • Linux
      Linux Icon
    • Kubernetes
      Cloud icon
    • Automation
      Automation Icon showing arrows moving in a circle around a gear
    • View All Technologies
    • Programming Languages & Frameworks

      • Java
      • Python
      • JavaScript
    • System Design & Architecture

      • Red Hat architecture and design patterns
      • Microservices
      • Event-Driven Architecture
      • Databases
    • Developer Productivity

      • Developer productivity
      • Developer Tools
      • GitOps
    • Automated Data Processing

      • AI/ML
      • Data Science
      • Apache Kafka on Kubernetes
    • Platform Engineering

      • DevOps
      • DevSecOps
      • Ansible automation for applications and services
    • Secure Development & Architectures

      • Security
      • Secure coding
  • Learn

    Featured

    • Kubernetes & Cloud Native
      Openshift icon
    • Linux
      Rhel icon
    • Automation
      Ansible cloud icon
    • AI/ML
      AI/ML Icon
    • View All Learning Resources

    E-Books

    • GitOps Cookbook
    • Podman in Action
    • Kubernetes Operators
    • The Path to GitOps
    • View All E-books

    Cheat Sheets

    • Linux Commands
    • Bash Commands
    • Git
    • systemd Commands
    • View All Cheat Sheets

    Documentation

    • Product Documentation
    • API Catalog
    • Legacy Documentation
  • Developer Sandbox

    Developer Sandbox

    • Access Red Hat’s products and technologies without setup or configuration, and start developing quicker than ever before with our new, no-cost sandbox environments.
    • Explore Developer Sandbox

    Featured Developer Sandbox activities

    • Get started with your Developer Sandbox
    • OpenShift virtualization and application modernization using the Developer Sandbox
    • Explore all Developer Sandbox activities

    Ready to start developing apps?

    • Try at no cost
  • Blog
  • Events
  • Videos

How to run Camel on Spring Boot in the Developer Sandbox

February 10, 2023
Bruno Meseguer
Related topics:
RuntimesSpring Boot
Related products:
Red Hat support for Spring Boot

Share:

    Apache Camel is known as the Swiss Army knife of integration. Yet many developers building microservices and delivering platforms that connect apps with backends are still unaware of integration frameworks like Camel, which has been perfected over the years to provide efficient and economical building blocks. Apache Camel excels at simplifying and standardizing your landscape of platform integration services. Camel on Spring Boot is one of the various options for running Apache Camel. Although the latest evolution of Camel offers new runtimes, such as Quarkus or Camel K (also Quarkus-based), Spring Boot is still a popular option for development teams with strong Java know-how.

    To learn more about the various Camel runtimes available, read the 3-part series article, Choose the best Camel for your integration ride.

    Why you should try Camel in the Developer Sandbox

    Experience Camel in the Developer Sandbox for Red Hat OpenShift, a hands-on, free environment. In this developer environment, you can play with Camel Spring Boot and try many other technologies.

    You’ll be able to do the following without the hassle of setting up your local environment:

    • Play for free in an OpenShift environment (Developer Sandbox).
    • Use the web-based IDE (Red Hat OpenShift Dev Spaces, formerly Red Hat CodeReady Workspaces) to sample a demo Camel on the Spring Boot project.
    • Run the Camel demo application as if you were developing it in your own IDE.
    • Deploy your Camel application in the Developer Sandbox.

    A demonstration of running Camel on Spring Boot

    This demo includes an OpenAPI service called simple, and also includes a stub serving XML data to simulate the backend service Camel integrates with. It’s a relatively simple use case but very common in the enterprise. It defines a REST API and hides a legacy service behind the scenes (Figure 1).

    Diagram showing the Camel on Spring Boot flow.
    Figure 1: The Camel on Spring Boot flow.

     

    This example stands out from the data handling point of view, where the JSON input needs to be mapped to the outgoing XML during the request flow and performs the reverse format translation during the response flow, as in Figure 2.

    Diagram showing the data format conversion.
    Figure 2: JSON / XML data mapping operations.

     

    What is unique about Camel running on Spring Boot, but also true for all runtimes, is how little code is required and how elegantly it is laid out. This simplicity guarantees economical, long-term, and sustainable support for your landscape of implemented Camel services.

    If you would like to see how all of this is done, jump straight onto the Developer Sandbox to explore the code and execute it. The next section demonstrates how to access the Developer Sandbox. 

    How to access the Developer Sandbox

    First things first, go to the Developer Sandbox to learn about what you can do. Then follow these steps:

    • Click on the Start your sandbox for free button, as shown in Figure 3.

      Try button to access the developer sandbox
      Figure 3: Access the developer sandbox
    • After that, you will see a login window shown in Figure 4.

      Login window to access the developer sandbox.
      Figure 4. Log in window.
    • If you don’t have a Red Hat account, click on Register for a Red Hat account. 
    • Enter the details requested and complete the registration process.
    • Once you successfully log in, you will be prompted to start using your sandbox, as shown in Figure 5.

      Ready to start using the developer sandbox.
      Figure 5: Enter the sandbox.
    • Click on the red button Start using your sandbox. This action will take you to the OpenShift Dedicated login page, as shown in Figure 6.

      Confirm the access to the developer sandbox.
      Figure 6: Confirm access to the developer sandbox.
    • Click on DevSandbox.
    • Once you’re in, the environment welcomes you with the message, Welcome to the Developer Perspective!

      Welcome message in the developer sandbox.
      Figure 7: Welcome message in the developer Sandbox.

       

      Feel free to start with a tour that explains the interface features.

    The Developer Sandbox ships with an entire web-based IDE entitled OpenShift Dev Spaces from which you can play with Camel on Spring Boot in a typical developer workflow using a code editor and a terminal. Let us show you how to open it and run the demo.

    How to prepare your dev environment

    To open Dev Spaces: 

    1. Click the applications icon as shown in Figure 8.
    2. Select Red Hat OpenShift Dev Spaces. 

      Top bar icon to select Red Hat OpenShift Dev Spaces
      Figure 8: How to open OpenShift Dev Spaces.
    3. The action above will open the Create Workspace dashboard in Dev Spaces.
    4. When the Create Workspace dashboard in Dev Spaces opens, copy the snippet below containing the Git repository URL:
      https://github.com/RedHat-Middleware-Workshops/devsandbox-camel.git
    5. And paste the URL in the text box Git Repo URL, highlighted in figure 9:

      Git repository URL configuration
      Figure 9: Git repository URL configuration.

       

    6. Click the Create & Open button.

      While the workspace provisions, you should see a progress log similar to Figure 10.

      Informational window of workspace provisioning.
      Figure 10: Progress log of the workspace provisioning process.

     

    When the IDE shows up, you will open the tutorial that will guide you through the Camel demo project.

    1. Click the deployable Endpoints accordion marked 1 (Figure 11).
    2. Click on the icon (marked 2), which opens the tutorial in a new browser tab.

      Open the tutorial from VSCode user interface
      Figure 11: Open the tutorial from VSCode.
    3. You will be prompted to confirm you want to open an external website, so click Open.
    4. The new browser tab will display the Solution Explorer interface containing tiles for different labs (Figure 12). Select the highlighted tile, Camel Spring Boot - Simple.

      The solution explorer showing the Camel Spring Boot lab.
      Figure 12: The solution explorer interface showing the Camel Spring Boot - Simple lab.

     

    When you click on the tile marked in red, the Solution Explorer will initiate the lab showing its introduction and exercise chapters, which you can complete in around 15 minutes. The exercises involve easy copy/paste actions to provide a smooth experience, demonstrating the highlights of Camel Spring Boot.

    Enjoy the Camel ride!

    This is only the start

    This article ends here, but this should only be the start of your journey with Apache Camel. The Developer Sandbox gives you the opportunity to play on a Kubernetes-based application platform with an integrated developer IDE (OpenShift Dev Spaces). Even for those unfamiliar with Kubernetes environments, this demo lab is great for sampling what it’s like to build applications with Camel.

    With just your browser, you can quickly complete the Camel Spring Boot lab and see for yourself how simply Camel resolves a typical use case and how easy it is to test, containerize, and run in OpenShift. Camel on Spring Boot keeps the key benefits Spring Boot lovers seek with easier development, auto-configuration, straightforward setup, and management.

    Camel has also evolved to run in container-tailored runtimes specifically designed to minimize memory footprint and maximize performance. If you want to learn more, check out these resources:

    • Learn more about the different Camel runtimes available by reading Choose the best Camel for your integration ride.
    • Explore Camel Quarkus in more detail by reading Boost Apache Camel performance with Quarkus.
    • Red Hat Developer's Camel K topic page is a good place to start learning about Camel K.
    • Visit  Red Hat Integration page to discover Camel complementary capabilities.
    Last updated: October 6, 2023

    Related Posts

    • Choose the best Camel for your integration ride, Part 1

    • Boost Apache Camel performance on Quarkus

    • Six reasons to love Camel K

    • Integrating Spring Boot with Red Hat Integration Service Registry

    • Try Camel on Quarkus in the Developer Sandbox for Red Hat OpenShift

    Recent Posts

    • Why some agentic AI developers are moving code from Python to Rust

    • Confidential VMs: The core of confidential containers

    • Benchmarking with GuideLLM in air-gapped OpenShift clusters

    • Run Qwen3-Next on vLLM with Red Hat AI: A step-by-step guide

    • How to implement observability with Python and Llama Stack

    What’s up next?

    Learn and experiment with Kubernetes using the free Developer Sandbox for Red Hat OpenShift! This hands-on tutorial walks you through how to create an application using Kubernetes step-by-step.

    Start the activity
    Red Hat Developers logo LinkedIn YouTube Twitter Facebook

    Products

    • Red Hat Enterprise Linux
    • Red Hat OpenShift
    • Red Hat Ansible Automation Platform

    Build

    • Developer Sandbox
    • Developer Tools
    • Interactive Tutorials
    • API Catalog

    Quicklinks

    • Learning Resources
    • E-books
    • Cheat Sheets
    • Blog
    • Events
    • Newsletter

    Communicate

    • About us
    • Contact sales
    • Find a partner
    • Report a website issue
    • Site Status Dashboard
    • Report a security problem

    RED HAT DEVELOPER

    Build here. Go anywhere.

    We serve the builders. The problem solvers who create careers with code.

    Join us if you’re a developer, software engineer, web designer, front-end designer, UX designer, computer scientist, architect, tester, product manager, project manager or team lead.

    Sign me up

    Red Hat legal and privacy links

    • About Red Hat
    • Jobs
    • Events
    • Locations
    • Contact Red Hat
    • Red Hat Blog
    • Inclusion at Red Hat
    • Cool Stuff Store
    • Red Hat Summit
    © 2025 Red Hat

    Red Hat legal and privacy links

    • Privacy statement
    • Terms of use
    • All policies and guidelines
    • Digital accessibility

    Report a website issue