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

PropertyPlaceHolder : IgnoreMissingLocation should protect from unresolvable system variable location

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 2.12.1
    • 2.12.2, 2.13.0
    • camel-core
    • None
    • Unknown

    Description

      When you add a location based on system variable in a propertyPlaceholder, the ignoreMissingLocation protect you from a missing file but not from a missing system variable (or env as well).

      Ex :

      <propertyPlaceholder ignoreMissingLocation="true" location="classpath:camel-property.properties, file:///${camel-property.config}" />
      

      This configuration failed to load context during unit tests, because camel-property.config system variable is not set. Spring handle this with the ignore-resource-not-found attribute, which is according to me the equivalent of ignoreMissingLocation.

      Attachments

        1. camel-property.zip
          5 kB
          Sébastien Brousse

        Activity

          People

            davsclaus Claus Ibsen
            seb_brousse Sébastien Brousse
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: