public class PropertyLoader extends Object
This will also pick up property files with names suffixed with
-<project stage>, e.g.
User configurations should have
deltaspike_ordinal as the first property, with a value greater than
|Modifier and Type||Field and Description|
|Modifier and Type||Method and Description|
Looks for all properties files with the given name in the classpath, loads them in ascending order determined by their ordinal and merges them.
public static final int CONFIGURATION_ORDINAL_DEFAULT_VALUE
public static Properties getProperties(String propertyFileName)
The idea is to be able to override properties by just providing a new properties file with the same name but a higher 'deltaspike_ordinal' than the old one.
If a property file defines no 'deltaspike_ordinal' property than a default value of
CONFIGURATION_ORDINAL_DEFAULT_VALUE is assumed. Any sensitive default which is provided by the system
parsing for the configuration should have a 'deltaspike_ordinal' value lower than 10. In most cases a value of
If two property files have the same 'deltaspike_ordinal', their order is undefined. The Properties file which gets found first will be processed first and thus gets overwritten by the one found later.
propertyFileName- the name of the properties file, without the extension '.properties'
Copyright © 2017 The Apache Software Foundation. All rights reserved.