REQ-2135: turn off java native

This commit is contained in:
yanglin 2024-04-01 15:46:02 +08:00
parent c7a0297354
commit 4ae4e03f7c

View File

@ -44,8 +44,9 @@ public class TemplateParser {
evalContext.addPropertyAccessor(new ReflectivePropertyAccessor(false));
evalContext.addPropertyAccessor(NullPropertyAccessor.INSTANCE);
TemplateParserContext templateContext = new TemplateParserContext(openToken, closeToken);
// turn off java native
SpelParserConfiguration parseCfg = new SpelParserConfiguration(
SpelCompilerMode.MIXED, TemplateParser.class.getClassLoader());
SpelCompilerMode.OFF, TemplateParser.class.getClassLoader());
Expression exp = new SpelExpressionParser(parseCfg).parseExpression(expression, templateContext);
exp.getValue(evalContext, String.class);
Object value = exp.getValue(evalContext);