Camel + SpringBoot: How to use custom properties in routes

Spring and Camel makes this quite easy (same solution can be used in Camel-K too). Here is an example of the use of custom property in a route

appilcation.properties

# Greeting
greeting = Hello World

# Timer
timer.period = 2000

Example route with the above properties

from("timer:hello?period={{timer.period}}")
     .log("{{greeting}}");

The route will now print out “Hello World” every 2 seconds

Tested on Apache Camel 3.20.0, SpringBoot 2.7.6, Java 11.0.18 and Ubuntu 20.04.4 LTS

Camel + SpringBoot: How to use custom properties in routes
Tagged on:         
Niklas Tech Blog
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.