Class PlainPropertiesProvider
java.lang.Object
com.sap.cds.framework.plain.environment.PlainPropertiesProvider
- All Implemented Interfaces:
PropertiesProvider
Default implementation of
PropertiesProvider
based on parsing a yaml-config file.
Per default, the properties are loaded from ./application.yaml in the resource path.
-DconfigFile=/somePath/config.yaml
overrides the default location.
Per default, the active profile is either the first profile with name 'default' or the first profile in the yaml.
-DconfigProfile=<profile-name>
switches the active profile.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
The YAML root representation -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription<T> T
bindPropertyClass
(String section, Class<T> clazz) <T> T
getProperty
(String key, Class<T> clazz, T defaultValue) getProperty
(String key, String defaultValue) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.sap.cds.services.environment.PropertiesProvider
getProperty, getProperty, hasProperty
-
Constructor Details
-
PlainPropertiesProvider
public PlainPropertiesProvider()
-
-
Method Details
-
bindPropertyClass
- Specified by:
bindPropertyClass
in interfacePropertiesProvider
-
getProperty
- Specified by:
getProperty
in interfacePropertiesProvider
-
getProperty
- Specified by:
getProperty
in interfacePropertiesProvider
-