ExpressionParser parser = new SpelExpressionParser(); StandardEvaluationContext context = new StandardEvaluationContext(); String expression = "#q123"; Record datas = new Record(); datas.put("q123",123); datas.put("q12",12); context.setRootObject(datas); System.out.println(parser.parseExpression(expression).getValue(context)); 为什么这种方式取不到值,表达式该怎么写好
1
XJohn 2019-09-07 11:52:08 +08:00 via iPhone
试试#[datas].’p123’
|