Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-10255

Camel Main - Make it easy to configure property placeholder

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 2.18.0
    • camel-core
    • None
    • Novice

    Description

      So you can use

      Where you can specify one or more locations separated by comma:

      main.setPropertyPlaceholderLocations("myapp.properties");

      See SO
      http://stackoverflow.com/questions/39033103/how-to-access-property-file-in-apache-camel-with-java-dsl

      Today its a bit harder to do, where you either need to use the MainListener or to setup the PropertiesComponent from a RouteBuilder configure method, or to use the bind which likely is the easiest.

      PropertiesComponent prop = new PropertiesComponent();
      prop.setXXX

      main.bind("properties, prop);

      Attachments

        Issue Links

          Activity

            People

              davsclaus Claus Ibsen
              davsclaus Claus Ibsen
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: