Class JavaPropertiesSource
java.lang.Object
io.fluxzero.common.application.JavaPropertiesSource
- All Implemented Interfaces:
PropertySource
- Direct Known Subclasses:
ApplicationEnvironmentPropertiesSource, ApplicationPropertiesSource, FluxzeroAdditionalPropertiesSource, FluxzeroPropertiesSource, SystemPropertiesSource
Base class for
PropertySource implementations backed by a Properties object.
This class provides a thin wrapper over a Properties instance and offers a consistent
way to retrieve configuration values using the get(String) method.
It can be extended by concrete sources such as SystemPropertiesSource or custom property file loaders.
- See Also:
-
Field Summary
Fields inherited from interface PropertySource
substitutionPattern -
Constructor Summary
ConstructorsConstructorDescriptionJavaPropertiesSource(Properties properties) Creates a new property source backed by the givenPropertiesinstance. -
Method Summary
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface PropertySource
andThen, containsProperty, get, getBoolean, getBoolean, getInteger, getInteger, require, substituteProperties, substituteProperties
-
Constructor Details
-
JavaPropertiesSource
Creates a new property source backed by the givenPropertiesinstance.- Parameters:
properties- thePropertiesinstance to use for lookups
-
-
Method Details
-
get
Retrieves the value for the given property name.- Specified by:
getin interfacePropertySource- Parameters:
name- the property key- Returns:
- the property value, or
nullif not present
-