java.lang.Object
io.fluxzero.common.application.JavaPropertiesSource
io.fluxzero.common.application.ApplicationPropertiesSource
- All Implemented Interfaces:
PropertySource
A Example
PropertySource implementation that loads properties from an application.properties file located on
the classpath.
This is a conventional source for static configuration values such as credentials, service endpoints, or application
settings. The file is expected to be in the root of the classpath (e.g., inside resources/).
Example application.properties:
service.url=https://api.example.com retry.count=3
The loaded properties are backed by a Properties instance and exposed via the
JavaPropertiesSource.get(String) method.
This class uses FileUtils.loadProperties(String) which supports merging multiple files with the
same name from the classpath and logs duplicate key warnings.
- See Also:
-
Field Summary
Fields inherited from interface io.fluxzero.common.application.PropertySource
substitutionPattern -
Constructor Summary
ConstructorsConstructorDescriptionConstructs a newApplicationPropertiesSourceby loading theapplication.propertiesfile from the classpath. -
Method Summary
Methods inherited from class io.fluxzero.common.application.JavaPropertiesSource
getMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.fluxzero.common.application.PropertySource
andThen, containsProperty, get, getBoolean, getBoolean, require, substituteProperties, substituteProperties
-
Constructor Details
-
ApplicationPropertiesSource
public ApplicationPropertiesSource()Constructs a newApplicationPropertiesSourceby loading theapplication.propertiesfile from the classpath.
-