@Override
  protected CamelContext createCamelContext() throws Exception {
    CamelContext context = super.createCamelContext();

    PropertiesComponent pc = new PropertiesComponent();
    pc.setCamelContext(context);
    pc.setLocation("classpath:org/apache/camel/component/properties/cheese.properties");
    context.addComponent("properties", pc);

    return context;
  }
コード例 #2
0
  @Override
  protected CamelContext createCamelContext() throws Exception {
    CamelContext context = super.createCamelContext();

    PropertiesComponent pc = new PropertiesComponent();
    pc.setCamelContext(context);
    pc.setLocations(new String[] {"ref:myCoolProperties"});
    context.addComponent("properties", pc);

    return context;
  }