REQ-2135: update messages
This commit is contained in:
parent
ff5bbc169f
commit
6ad2b93f84
@ -49,8 +49,9 @@ public class TemplateParser {
|
|||||||
SpelCompilerMode.OFF, TemplateParser.class.getClassLoader());
|
SpelCompilerMode.OFF, TemplateParser.class.getClassLoader());
|
||||||
Expression exp = new SpelExpressionParser(parseCfg).parseExpression(expression, templateContext);
|
Expression exp = new SpelExpressionParser(parseCfg).parseExpression(expression, templateContext);
|
||||||
Object value = exp.getValue(evalContext);
|
Object value = exp.getValue(evalContext);
|
||||||
|
// 不返回空字符串, 返回null形象点
|
||||||
if (value == null)
|
if (value == null)
|
||||||
return "";
|
return "null";
|
||||||
return value instanceof String ? (String) value : String.valueOf(value);
|
return value instanceof String ? (String) value : String.valueOf(value);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.warn("无效的模版内容, 请检查格式是否正确. expression={}, value={}",
|
log.warn("无效的模版内容, 请检查格式是否正确. expression={}, value={}",
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user