@Test public void testHello() throws Exception { assertEquals("Hello, World!", springELTry.hello()); }
public String hello() { ExpressionParser parser = new SpelExpressionParser(); Expression expression = parser.parseExpression("('Hello' + ', World').concat(#end)"); EvaluationContext context = new StandardEvaluationContext(); context.setVariable("end", "!"); return expression.getValue(context).toString(); }
SpringELTry { public String hello() { ExpressionParser parser = new SpelExpressionParser(); Expression expression = parser.parseExpression("('Hello' + ', World').concat(#end)"); EvaluationContext context = new StandardEvaluationContext(); context.setVariable("end", "!"); return expression.getValue(context).toString(); } }
SpringELTry { public String hello() { ExpressionParser parser = new SpelExpressionParser(); Expression expression = parser.parseExpression("('Hello' + ', World').concat(#end)"); EvaluationContext context = new StandardEvaluationContext(); context.setVariable("end", "!"); return expression.getValue(context).toString(); }  }
SpringELTry { public String hello() { ExpressionParser parser = new SpelExpressionParser(); Expression expression = parser.parseExpression("('Hello' + ', World').concat(#end)"); EvaluationContext context = new StandardEvaluationContext(); context.setVariable("end", "!"); return expression.getValue(context).toString(); }  String hello(); boolean matchExpression(); boolean matchExpression2(); }
SpringELTry { public String hello() { ExpressionParser parser = new SpelExpressionParser(); Expression expression = parser.parseExpression("('Hello' + ', World').concat(#end)"); EvaluationContext context = new StandardEvaluationContext(); context.setVariable("end", "!"); return expression.getValue(context).toString(); }  String hello(); boolean matchExpression(); boolean matchExpression2();  }