public class DefaultMessagePlaceholderReplacementStrategy extends Object implements MessagePlaceholderReplacementStrategy
{$find" (i.e. open curly
bracket followed by the given input string) and replaces it with the respective "{$replaceWith" string.
This default implementation can be used to replace incoming placeholders with positional parameters, e.g. a UUID like
string such as {54947df8-0e9e-4471-a2f9-9af509fb5889} string with a positional parameter such as
{1}.| Constructor and Description |
|---|
DefaultMessagePlaceholderReplacementStrategy() |
| Modifier and Type | Method and Description |
|---|---|
String |
replace(String message,
String find,
String replaceWith)
Searches for occurrences of the given
find String in the given message String and replaces it with
the given replaceWith String. |
public DefaultMessagePlaceholderReplacementStrategy()
public String replace(String message, String find, String replaceWith)
MessagePlaceholderReplacementStrategyfind String in the given message String and replaces it with
the given replaceWith String. Note: Returns null if no replacement happened!replace in interface MessagePlaceholderReplacementStrategymessage - the String to search infind - the String to findreplaceWith - the String to replace any found occurrence withfind String wasn't found, i.e. if no replacements
happened.Copyright © 2017 SAP SE. All Rights Reserved.