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.
PLACEHOLDER_PREFIX, PLACEHOLDER_SUFFIX, System#getProperty(String)
| Modifier and Type | Class and Description |
|---|---|
| private static class | SystemPropertyUtils.SystemPropertyPlaceholderResolver
PlaceholderResolver implementation that resolves against system properties and system environment variables. |
| Modifier and Type | Field and Description |
|---|---|
| private static final PropertyPlaceholderHelper | |
| public static final String | PLACEHOLDER_PREFIX
Prefix for system property placeholders: ${. |
| public static final String | PLACEHOLDER_SUFFIX
Suffix for system property placeholders: }. |
| private static final PropertyPlaceholderHelper | |
| public static final String | VALUE_SEPARATOR
Value separator for system property placeholders: :. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public static String | Returns: the resolved Stringthe String to resolve text)Resolve |
| public static String | Returns: the resolved Stringthe String to resolve text, boolean whether unresolved placeholders are to be ignored ignoreUnresolvablePlaceholders)Resolve |
| nonStrictHelper | back to summary |
|---|---|
| private static final PropertyPlaceholderHelper nonStrictHelper | |
| PLACEHOLDER_PREFIX | back to summary |
|---|---|
| public static final String PLACEHOLDER_PREFIX Prefix for system property placeholders: ${. | |
| PLACEHOLDER_SUFFIX | back to summary |
|---|---|
| public static final String PLACEHOLDER_SUFFIX Suffix for system property placeholders: }. | |
| strictHelper | back to summary |
|---|---|
| private static final PropertyPlaceholderHelper strictHelper | |
| VALUE_SEPARATOR | back to summary |
|---|---|
| public static final String VALUE_SEPARATOR Value separator for system property placeholders: :. | |
| SystemPropertyUtils | back to summary |
|---|---|
| public SystemPropertyUtils() | |
| resolvePlaceholders | back to summary |
|---|---|
| public static String resolvePlaceholders(String text) Resolve
| |
| resolvePlaceholders | back to summary |
|---|---|
| public static String resolvePlaceholders(String text, boolean ignoreUnresolvablePlaceholders) Resolve
| |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public String | resolvePlaceholder(String
the name of the placeholder to resolve placeholderName)Implements org. |
| text | back to summary |
|---|---|
| private final String text | |
| SystemPropertyPlaceholderResolver | back to summary |
|---|---|
| public SystemPropertyPlaceholderResolver(String text) | |
| resolvePlaceholder | back to summary |
|---|---|
| public String resolvePlaceholder(String placeholderName) Implements org. Doc from org. Resolve the supplied placeholder name to the replacement value. | |