import org.springframework.util.PropertyPlaceholderHelper;
import java.util.Properties;
public class PlaceholderUtil {
private static PropertyPlaceholderHelper helper = new PropertyPlaceholderHelper(
"#{", "}", ":", false);
public static String replacePlaceholders(String value, final Properties properties) {
return helper.replacePlaceholders(value, properties);
}
}
String time = String.format("%tc", date);
Object[] valueArr= {"aaa", 123};
MessageFormatter.arrayFormat("str {} int {}", valueArr).getMessage();
// {} 定位变量位置
// {} 表示 跳过该对括号
// 前面再加 则取消跳过