public abstract class SystemPropertyUtils extends Object
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)| 限定符和类型 | 字段和说明 |
|---|---|
static String |
PLACEHOLDER_PREFIX
Prefix for system property placeholders: "${"
|
static String |
PLACEHOLDER_SUFFIX
Suffix for system property placeholders: "}"
|
static String |
VALUE_SEPARATOR
Value separator for system property placeholders: ":"
|
| 构造器和说明 |
|---|
SystemPropertyUtils() |
| 限定符和类型 | 方法和说明 |
|---|---|
static String |
resolvePlaceholders(String text)
Resolve ${...} placeholders in the given text, replacing them with
corresponding system property values.
|
static String |
resolvePlaceholders(String text,
boolean ignoreUnresolvablePlaceholders)
Resolve ${...} placeholders in the given text, replacing them with
corresponding system property values.
|
public static final String PLACEHOLDER_PREFIX
public static final String PLACEHOLDER_SUFFIX
public static String resolvePlaceholders(String text)
text - the String to resolveIllegalArgumentException - if there is an unresolvable placeholderPLACEHOLDER_PREFIX,
PLACEHOLDER_SUFFIXpublic static String resolvePlaceholders(String text, boolean ignoreUnresolvablePlaceholders)
text - the String to resolveignoreUnresolvablePlaceholders - flag to determine is unresolved
placeholders are ignoredIllegalArgumentException - if there is an unresolvable placeholder
and the flag is falsePLACEHOLDER_PREFIX,
PLACEHOLDER_SUFFIXCopyright © 2013 The Skfiy Open Association. All Rights Reserved.