Using Spring configuration - 7.3

Talend Open Studio User Guide

Talend Open Studio for Big Data
Talend Open Studio for Data Integration
Talend Open Studio for Data Quality
Talend Open Studio for ESB
Talend Studio
Design and Development
Last publication date
Available in...

Open Studio for ESB

Spring is an application development framework for enterprise Java. Apache Camel is designed to work nicely with the Spring Framework. The Route designer of Talend Studio allows you to add a Spring context to a Route for configuration purpose. You can define beans and resources in Spring XML DSL and then use them in Routes. This makes it possible for developers to combine Java and Spring codes in the configuration of Routes. It is particularly useful when there is no explicit component available in the palette.

To be able to use the Spring configuration, your knowledge of Spring is required. For more information about Spring, see the site For the Spring support of Apache Camel, see

To add a Spring context to a Route, you need first to create the Route. For more information about how to create a Route, see Creating a Route.

The Spring tab is located in the lower half of the design workspace. When you create a Route in the design workspace, a default Spring configuration is set in the Spring view.

By default, the Apache Camel JMX Notification is declared in the Spring configuration. You can configure it as needed and call it in the Route. For more information about Apache Camel JMX Notification, see

Enter the code you want to implement in this view. The screenshot above shows an example of using a bean to call a previously defined Route Resource named RouteWithSpring:

<bean id="properties" class="">
    <property name="location" value=""/>

For more information about creating and using Route Resources, see Using Route Resources.

The following code gives another example that defines a message routing from the endpoint vm:a to log:vm:

		<camel:from uri="vm:a" />
		<camel:to uri="log:vm" />

When you export a Route, the Spring XML file will be also exported in the KAR file.

Click the Restore Default button to change back to the default Spring configuration.

For a real-life use case of how to use Spring configuration in a Route, see the scenario provided for cSEDA in SEDA (Mediation).


When the Spring configuration is wrong, the Route may fail to start.