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

PropertyPlaceHolder : IgnoreMissingLocation should protect from unresolvable system variable location

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.12.1
    • Fix Version/s: 2.12.2, 2.13.0
    • Component/s: camel-core
    • Labels:
      None
    • Estimated Complexity:
      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

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

              Dates

              • Created:
                Updated:
                Resolved: