spring-framework / org.springframework.util / SystemPropertyUtils / resolvePlaceholders

resolvePlaceholders

open static fun resolvePlaceholders(text: String): String

Resolve ${...} placeholders in the given text, replacing them with corresponding system property values.

Parameters

text - the String to resolve

Exceptions

IllegalArgumentException - if there is an unresolvable placeholder

Return
the resolved String

See Also
#PLACEHOLDER_PREFIX#PLACEHOLDER_SUFFIX

open static fun resolvePlaceholders(text: String, ignoreUnresolvablePlaceholders: Boolean): String

Resolve ${...} placeholders in the given text, replacing them with corresponding system property values. Unresolvable placeholders with no default value are ignored and passed through unchanged if the flag is set to true.

Parameters

text - the String to resolve

ignoreUnresolvablePlaceholders - whether unresolved placeholders are to be ignored

Exceptions

IllegalArgumentException - if there is an unresolvable placeholder and the "ignoreUnresolvablePlaceholders" flag is false

Return
the resolved String

See Also
#PLACEHOLDER_PREFIX#PLACEHOLDER_SUFFIX