I am wondering if the below is possible in Spring
I could just create the routes using java code on the apache camel context, but wondering if it is possible through spring.
Reading a property file in a Spring XML wiring file is easy; e.g. using a PropertiesFactoryBean. However, the second part of the problem cannot (I believe) be solved without writing a significant amount of Java code.
I suggest that you read Section 3.8.3 of the Spring Reference that describes how to write your own FactoryBean classes. Another possibility is to create a custom Java configuration bean as described in Section 3.11. There may be other possibilities too.
Warning: none of this stuff is particularly straight-forward if you are coming at it for the first time.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With