Embedding Camel in a Spring application
This recipe will show you how to integrate Camel into a Spring application.
Getting ready
When using Camel within a Spring application, it is necessary to add the following dependencies to the minimal set defined in the Using Camel in a Java application recipe in this chapter:
<dependency> <groupId>org.apache.camel</groupId> <artifactId>camel-spring</artifactId> <version>${camel-version}</version> </dependency> <dependency> <groupId>org.apache.camel</groupId> <artifactId>camel-test-spring</artifactId> <version>${camel-version}</version> <scope>test</scope> </dependency>
The ${camel-version}
property is defined once in the Maven POM.
The Java code for this recipe is located in the org.camelcookbook.structuringroutes.simplespring ...
Get Apache Camel Developer's Cookbook now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.