Busy watching the recording of knowledge

A, spring EL expression:

  Variables: variables can be used in the expression syntax # 'variable name' references
  ExpressionParser EP = new new SpelExpressionParser ();
  // create a context variable
  EvaluationContext ctx = new new StandardEvaluationContext ();
  ctx.setVariable ( "name", "the Hello");

  Expression expression = ep.parseExpression("#name")

  System.out.println(expression .getValue(ctx,String.class));

Guess you like

Origin www.cnblogs.com/jackLikui/p/10943770.html