Announcement Announcement Module
Collapse
No announcement yet.
What is use of Spring Expression language Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • What is use of Spring Expression language

    I started learning Spring 3 and came accross SpEL.

    I understand following

    @Value("#{ systemProperties }")
    private Properties systemProperties;
    @Value("#{ systemProperties['user.region'] }")
    private String userRegion;


    This is used for injecting values dynamically. I understood.


    But
    What is use of Using the Spring Expression Language Parser?

    Expression exp = PARSER.parseExpression("'foo'");
    String value = exp.getValue(String.class);


    I could not understand use of above. How am I going to use it? Is it only something like assert? Used for testing?
Working...
X