| java.lang.Object | |
| ↳ | org.springframework.util.PropertyPlaceholderHelper |
Utility class for working with Strings that have placeholder values in them. A placeholder takes the form
${name}. Using PropertyPlaceholderHelper these placeholders can be substituted for
user-supplied values.
Values for substitution can be supplied using a Properties instance or
using a PropertyPlaceholderHelper.PlaceholderResolver.
| Nested Classes | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| PropertyPlaceholderHelper.PlaceholderResolver | Strategy interface used to resolve replacement values for placeholders contained in Strings. | ||||||||||
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Creates a new
PropertyPlaceholderHelper that uses the supplied prefix and suffix. | |||||||||||
Creates a new
PropertyPlaceholderHelper that uses the supplied prefix and suffix. | |||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Replaces all placeholders of format
${name} with the corresponding property
from the supplied Properties. | |||||||||||
Replaces all placeholders of format
${name} with the value returned from the supplied
PropertyPlaceholderHelper.PlaceholderResolver. | |||||||||||
| Protected Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
Creates a new PropertyPlaceholderHelper that uses the supplied prefix and suffix.
Unresolvable placeholders are ignored.
| placeholderPrefix | the prefix that denotes the start of a placeholder. |
|---|---|
| placeholderSuffix | the suffix that denotes the end of a placeholder. |
Creates a new PropertyPlaceholderHelper that uses the supplied prefix and suffix.
| placeholderPrefix | the prefix that denotes the start of a placeholder |
|---|---|
| placeholderSuffix | the suffix that denotes the end of a placeholder |
| valueSeparator | the separating character between the placeholder variable and the associated default value, if any |
| ignoreUnresolvablePlaceholders | indicates whether unresolvable placeholders should be ignored
(true) or cause an exception (false).
|
Replaces all placeholders of format ${name} with the corresponding property
from the supplied Properties.
| value | the value containing the placeholders to be replaced. |
|---|---|
| properties | the Properties to use for replacement. |
Replaces all placeholders of format ${name} with the value returned from the supplied
PropertyPlaceholderHelper.PlaceholderResolver.
| value | the value containing the placeholders to be replaced. |
|---|---|
| placeholderResolver | the PlaceholderResolver to use for replacement. |