Class StubRunnerPropertyUtils
java.lang.Object
org.springframework.cloud.contract.stubrunner.StubRunnerPropertyUtils
Reads property from system prop and from env var.
- Since:
- 2.0.0
- Author:
- Marcin Grzejszczak
-
Method Summary
Modifier and TypeMethodDescriptionstatic StringgetProperty(Map<String, String> options, String propName) static booleanhasProperty(Map<String, String> options, String propName) static booleanisPropertySet(String propName)
-
Method Details
-
isPropertySet
- Parameters:
propName- property name- Returns:
- for Env vars takes the prop name, converts dots to underscores and applies upper case
-
hasProperty
- Parameters:
options- map of optionspropName- property name- Returns:
- For options, system props and env vars returns
truewhen property is set
-
getProperty
- Parameters:
options- map of optionspropName- property name- Returns:
- Tries to pick a value from options, for Env vars takes the prop name, converts dots to underscores and applies upper case
-