public class ReplacementFormatter extends Object
| Constructor and Description |
|---|
ReplacementFormatter(String prefix,
String suffix) |
| Modifier and Type | Method and Description |
|---|---|
ReplacementFormatter |
defaultValue(Map<String,?> map)
添加默认值
|
ReplacementFormatter |
defaultValue(String key,
Object value)
添加默认值
|
ReplacementFormatter |
errorStrategy(ErrorStrategy errorStrategy)
设置错误处理策略
|
String |
format(String template,
Object o)
格式化
|
String |
format(String template,
String json)
格式化
|
ReplacementFormatter |
noMatchStrategy(NoMatchStrategy noMatchStrategy)
设置未匹配到策略
|
public ReplacementFormatter noMatchStrategy(NoMatchStrategy noMatchStrategy)
noMatchStrategy - noMatchStrategypublic ReplacementFormatter errorStrategy(ErrorStrategy errorStrategy)
errorStrategy - errorStrategypublic ReplacementFormatter defaultValue(String key, Object value)
key - keyvalue - valuepublic ReplacementFormatter defaultValue(Map<String,?> map)
map - mappublic String format(String template, Object o)
template - templateo - oCopyright © 2024. All rights reserved.