I am tring to load the resource: src/com/company/my.properties
, but it can't be found on the classpath.
Error
Failed to create route route1: Route(route1)[[From[properties:{{fromroute}}]] ->
[Choice[[When[... because of Failed to resolve endpoint: properties://%7B%7Bfromroute%7D%7D due to:
Properties file com/company/my.properties not found in classpath
- camel core:2.18
- camel properties read refer : Doc
The my.properties
file contains a 'fromroute' key:
fromroute=file:/a/b
The following snippet shows how I'm trying to load the file.
PropertiesComponent pc = new PropertiesComponent();
pc.setLocation("classpath:com/company/my.properties");
context.addComponent("properties", pc);
....
from("properties:{{fromroute}}")
....