[ https://issues.apache.org/jira/browse/GROOVY-8041?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Bence Takács resolved GROOVY-8041. ---------------------------------- Resolution: Workaround I got this very simple approach from stackoverflow: template.make(new ConfigSlurper().parse(props)) ...which transforms the flat (properties) map into a multi-level one :-) ( http://stackoverflow.com/questions/41588404/parsing-properties-files-in-groovy-where-keys-contain-dot-and-use-as-templat/41591824#41591824 ) Thanks for your help > The templating engine does not handle properly the binding parameters that > contains dot ('.') character > ------------------------------------------------------------------------------------------------------- > > Key: GROOVY-8041 > URL: https://issues.apache.org/jira/browse/GROOVY-8041 > Project: Groovy > Issue Type: Bug > Affects Versions: 2.4.7 > Reporter: Bence Takács > Assignee: Jochen Theodorou > > The templating engine does not handle properly the binding parameters that > contains dot ('.') character > The below script throws an exception while the assertion passes: > def template = new groovy.text.SimpleTemplateEngine().createTemplate('Testing > ${a.b}') > def params = ['a.b':'working'] > assert params['a.b'] > println template.make(params) > "groovy.lang.MissingPropertyException: No such property: a for class: > SimpleTemplateScript22 > at SimpleTemplateScript22.run(SimpleTemplateScript22.groovy:1) > at Script1.run(Script1.groovy:5)" > The issue is valid for also StreamingTemplateEngine and GStringTemplateEngine -- This message was sent by Atlassian JIRA (v6.3.4#6332)