Skip to main content
Redhat Developers  Logo
  • AI

    Get started with AI

    • Red Hat AI
      Accelerate the development and deployment of enterprise AI solutions.
    • AI learning hub
      Explore learning materials and tools, organized by task.
    • AI interactive demos
      Click through scenarios with Red Hat AI, including training LLMs and more.
    • AI/ML learning paths
      Expand your OpenShift AI knowledge using these learning resources.
    • AI quickstarts
      Focused AI use cases designed for fast deployment on Red Hat AI platforms.
    • No-cost AI training
      Foundational Red Hat AI training.

    Featured resources

    • OpenShift AI learning
    • Open source AI for developers
    • AI product application development
    • Open source-powered AI/ML for hybrid cloud
    • AI and Node.js cheat sheet

    Red Hat AI Factory with NVIDIA

    • Red Hat AI Factory with NVIDIA is a co-engineered, enterprise-grade AI solution for building, deploying, and managing AI at scale across hybrid cloud environments.
    • Explore the solution
  • Learn

    Self-guided

    • Documentation
      Find answers, get step-by-step guidance, and learn how to use Red Hat products.
    • Learning paths
      Explore curated walkthroughs for common development tasks.
    • Guided learning
      Receive custom learning paths powered by our AI assistant.
    • See all learning

    Hands-on

    • Developer Sandbox
      Spin up Red Hat's products and technologies without setup or configuration.
    • Interactive labs
      Learn by doing in these hands-on, browser-based experiences.
    • Interactive demos
      Click through product features in these guided tours.

    Browse by topic

    • AI/ML
    • Automation
    • Java
    • Kubernetes
    • Linux
    • See all topics

    Training & certifications

    • Courses and exams
    • Certifications
    • Skills assessments
    • Red Hat Academy
    • Learning subscription
    • Explore training
  • Build

    Get started

    • Red Hat build of Podman Desktop
      A downloadable, local development hub to experiment with our products and builds.
    • Developer Sandbox
      Spin up Red Hat's products and technologies without setup or configuration.

    Download products

    • Access product downloads to start building and testing right away.
    • Red Hat Enterprise Linux
    • Red Hat AI
    • Red Hat OpenShift
    • Red Hat Ansible Automation Platform
    • See all products

    Featured

    • Red Hat build of OpenJDK
    • Red Hat JBoss Enterprise Application Platform
    • Red Hat OpenShift Dev Spaces
    • Red Hat Developer Toolset

    References

    • E-books
    • Documentation
    • Cheat sheets
    • Architecture center
  • Community

    Get involved

    • Events
    • Live AI events
    • Red Hat Summit
    • Red Hat Accelerators
    • Community discussions

    Follow along

    • Articles & blogs
    • Developer newsletter
    • Videos
    • Github

    Get help

    • Customer service
    • Customer support
    • Regional contacts
    • Find a partner

    Join the Red Hat Developer program

    • Download Red Hat products and project builds, access support documentation, learning content, and more.
    • Explore the benefits

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

    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

    • Tekton joins the CNCF as an incubating project

    • Federated identity across the hybrid cloud using zero trust workload identity manager

    • Confidential virtual machine storage attack scenarios

    • Introducing virtualization platform autopilot

    • Integrate zero trust workload identity manager with Red Hat OpenShift GitOps

    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

    Platforms

    • Red Hat AI
    • Red Hat Enterprise Linux
    • Red Hat OpenShift
    • Red Hat Ansible Automation Platform
    • See all products

    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
    © 2026 Red Hat

    Red Hat legal and privacy links

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

    Chat Support

    Please log in with your Red Hat account to access chat support.