MessageFormat的使用

content 的字符串是 这个: <a href="https://www.baidu.com?code={0}">点击这里完成激活</a>

uuid 是这个745f6baf-0a81-4180-b511-8d12a68d89e3 字符串,

content = MessageFormat.format(content, uuid);

然后就可以填进去占位符哪里

<a href="https://www.baidu.com?code=745f6baf-0a81-4180-b511-8d12a68d89e3">点击这里完成激活</a>

原文地址:https://www.cnblogs.com/iwssea/p/5707077.html