java.lang.Object | |
↳ | org.springframework.util.SystemPropertyUtils |
Helper class for resolving placeholders in texts. Usually applied to file paths.
A text may contain ${...}
placeholders, to be resolved as system properties: e.g.
${user.dir}
. Default values can be supplied using the ":" separator between key
and value.
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
String | PLACEHOLDER_PREFIX | Prefix for system property placeholders: "${" | |||||||||
String | PLACEHOLDER_SUFFIX | Suffix for system property placeholders: "}" | |||||||||
String | VALUE_SEPARATOR | Value separator for system property placeholders: ":" |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Resolve ${...} placeholders in the given text, replacing them with corresponding system property values.
| |||||||||||
Resolve ${...} placeholders in the given text, replacing them with corresponding system property values.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Prefix for system property placeholders: "${"
Suffix for system property placeholders: "}"
Value separator for system property placeholders: ":"
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.
text | the String to resolve |
---|---|
ignoreUnresolvablePlaceholders | flag to determine is unresolved placeholders are ignored |
IllegalArgumentException | if there is an unresolvable placeholder and the flag is false |
---|
Resolve ${...} placeholders in the given text, replacing them with corresponding system property values.
text | the String to resolve |
---|
IllegalArgumentException | if there is an unresolvable placeholder |
---|