We have a scenario like the input data of Freemarker expression contains spaces in variable ${employee name?} and getting below error
"Exception in thread "main" freemarker.core.ParseException: Encountered "name" at line 1, column 12 in EMAILTEMPLATES" while applying the expression .
Does Freemarker support space in free marker variable?
Map<Object,Object> out= new HashMap<>();
out.put("employee name", "XXX");
String templateStr="<p> ${employee name?} </p>";
StringWriter out = new StringWriter();
Template emailTemplate = new Template(EMAILTEMPLATES, new
StringReader(templateStr),templateConfiguartion);
emailTemplate.process(dataMap, out);