The camel-spring-boot-starter dependency integrates Apache Camel into a Spring Boot application with auto-configuration. Adding it creates a CamelContext managed by Spring, discovers your RouteBuilder beans and starts and stops the routes together with the application, so you can write integration routes without manual setup.
The artifact is org.apache.camel.springboot:camel-spring-boot-starter. Current Camel 4.x releases require Java 17 or newer and Spring Boot 3.x, so check the compatibility table of the Camel version you pick.
The starter pulls in camel-spring-boot, Camel core and the Spring Boot auto-configuration classes. In practice it gives you:
CamelContext bean created and lifecycle-managed by Spring.RouteBuilder classes registered as Spring beans.ProducerTemplate and ConsumerTemplate beans you can inject.application.properties or application.yml under the camel. prefix.camel-kafka-starter or camel-jms-starter, which are added per component.The core starter does not bundle every component. Each connector (HTTP, Kafka, JMS, AWS and so on) is a separate dependency, which keeps your application small.
Maven, with the Camel Spring Boot BOM so versions stay aligned:
Set camel.version in your properties to the Camel release you are targeting. Gradle users can use implementation platform(...) with the same BOM.
A route is a Spring bean that extends RouteBuilder:
Start the application and the timer fires every five seconds:
Because the route is a @Component, it can receive other Spring beans through constructor injection and can call them from the route using .bean(...).
Camel settings live in the normal Spring configuration:
A plain console application with only timer routes has no non-daemon thread keeping it alive, so main-run-controller: true keeps the JVM running. A web application stays alive anyway because of the embedded server.
The Camel context starts after the Spring context is ready and shuts down gracefully when Spring closes, giving in-flight exchanges time to finish. You can also list routes and control them at runtime with Spring Boot Actuator when you include the Camel health and management support.
| Situation | Starter helps? |
|---|---|
| Spring Boot service that moves data between systems (files, queues, REST, databases) | Yes, this is its main use case. |
| Simple one-off REST call | Usually not; RestClient is enough. |
| Complex enterprise integration patterns (routing, splitting, aggregating, retries) | Yes, Camel provides them in the DSL. |
| Standalone integration without Spring | Use Camel Main or Quarkus instead. |
The starter is a thin dependency that brings in camel-spring-boot plus its auto-configuration. You normally declare the starter only.
Yes. The core starter has no connectors; add camel-http-starter, camel-kafka-starter or others for the components your routes use.
Camel 4.x needs Java 17 or newer and Spring Boot 3.x. Check the version table of the exact Camel release before upgrading.
Inject CamelContext and call getRouteController().stopRoute("routeId"), giving the route an id with .routeId("...").
camel-spring-boot-starter wires Apache Camel into Spring Boot with a managed CamelContext, automatic route discovery, templates and property-based configuration. Add it with the Camel Spring Boot BOM, add the component starters you need, define routes as RouteBuilder components and let Spring manage the lifecycle.