Uploaded image for project: 'Commons Configuration'
  1. Commons Configuration
  2. CONFIGURATION-541

Support for Property files in MultiFileHierarchicalConfiguration. Currently only xml files are supported.

    XMLWordPrintableJSON

    Details

    • Type: Wish
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.8
    • Fix Version/s: 2.0
    • Component/s: Build
    • Labels:
      None

      Description

      <?xml version="1.0" encoding="ISO-8859-1" ?>
      <configuration>
      <header>
      <result delimiterParsingDisabled="true" forceReloadCheck="true" loggerName="TestLogger"
      config-class="org.apache.commons.configuration.DynamicCombinedConfiguration"
      keyPattern="$$${sys:filename}">
      <nodeCombiner config-class="org.apache.commons.configuration.tree.MergeCombiner"/>
      </result>
      <providers>
      <provider config-tag="multifile"
      config-class="org.apache.commons.configuration.DefaultConfigurationBuilder$FileConfigurationProvider"
      configurationClass="org.apache.commons.configuration.MultiFileHierarchicalConfiguration"/>
      </providers>
      </header>
      <override>
      <system />
      <multifile filePattern="/usr/config/$$$${sys:filename}.xml"
      config-name="clientConfig1" delimiterParsingDisabled="true" schemaValidation="false">
      <reloadingStrategy refreshDelay="500"
      config-class="org.apache.commons.configuration.reloading.FileChangedReloadingStrategy"/>
      </multifile>
      <multifile filePattern="/usr/configclient/$$$${sys:filename}.properties"
      config-name="clientConfig1" delimiterParsingDisabled="true" schemaValidation="false">
      <reloadingStrategy refreshDelay="500"
      config-class="org.apache.commons.configuration.reloading.FileChangedReloadingStrategy"/>
      </multifile>
      <xml fileName="portal/default.xml"
      config-name="defaultConfig" delimiterParsingDisabled="true" schemaValidation="false">
      <reloadingStrategy refreshDelay="500"
      config-class="org.apache.commons.configuration.reloading.FileChangedReloadingStrategy"/>
      </xml>
      </override>
      </configuration>

      in the above MultiFileHierarchicalConfiguration config file, I want to load properties from both xml and properties file. Currently, in 1.8, only xml is supported. for .properties file, I get a SAX parsing exception.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              hmmtmm2 Meraj
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: