Home > other >  Message template ${code} placeholder like ali cloud, seven NiuYun generally is how to replace? Suppo
Message template ${code} placeholder like ali cloud, seven NiuYun generally is how to replace? Suppo

Time:12-04




Message template ${code} placeholder like ali cloud, seven NiuYun generally is how to replace? Support multiple replace

Java

CodePudding user response:


Apache.com mons. Lang StrSubstitutor have such tools, directly replace

CodePudding user response:


Regular

CodePudding user response:


A freemarker, velocity

CodePudding user response:

 
String template="verification code: ${code}";
Map The map=new HashMap<> (a);
The map. The put (" code ", "123456");
String replace=org.apache.com mons. Lang. Text. StrSubstitutor. Replace (template, map);
  • Related