I am trying to learn Spring
, so from here I got this example,
ExpressionParser parser = new SpelExpressionParser();
// evals to "Hello World"
String helloWorld = (String) parser.parseExpression("'Hello World'").getValue();
But I didn't understand it exact usage, 'cause I can better declare it as
String helloWorld = "Hello World";
So what is the exact use of above SpEL
?
Where can I use it better way?
Aucun commentaire:
Enregistrer un commentaire