REQ-2135: update messages

This commit is contained in:
yanglin 2024-04-01 16:23:55 +08:00
parent ff5bbc169f
commit 6ad2b93f84

View File

@ -49,8 +49,9 @@ public class TemplateParser {
SpelCompilerMode.OFF, TemplateParser.class.getClassLoader());
Expression exp = new SpelExpressionParser(parseCfg).parseExpression(expression, templateContext);
Object value = exp.getValue(evalContext);
// 不返回空字符串, 返回null形象点
if (value == null)
return "";
return "null";
return value instanceof String ? (String) value : String.valueOf(value);
} catch (Exception e) {
log.warn("无效的模版内容, 请检查格式是否正确. expression={}, value={}",