Inline lists and Inline Maps in SpEL:-
Lists can be expressed directly in an expression using {}
notation.
//evaluates to a Spring list containing the three numbers
List num = (List) parser.parseExpression("{1,2,3,}").getValue(context);
List listOfLists = (List) parser.parseExpression("{{'a','b'},{'x','y'}}").getValue(context);
Maps can also be expressed directly in an expression using {key:value} notation.
//evaluates to a Spring map containing the two entries
Map map = (Map) parser.parseExpression("{name:'Vipul',dob:'01-July-1999'}").getValue(context);
Map mapOfMaps = (Map) parser.parseExpression("{name:{first:'Vipul',last:'Sharma'},dob:{day:01,month:'July',year:1999}}").getValue(context);