0

I have JVM option to define each envrionment. It is something like -Denv="development". How can I access this JVM option in camel context and decide my route based on the env value?

Himanshu Yadav
  • 13,315
  • 46
  • 162
  • 291

1 Answers1

2

use the camel-properties component...

PropertiesComponent pc = context.getComponent("properties", PropertiesComponent.class);

from("direct:start").to("properties:{{cool.end}}");
Ben ODay
  • 20,784
  • 9
  • 45
  • 68