Converting application.yml to application.groovy

426 مرّة مشاهدة
التخطي إلى أول رسالة غير مقروءة

Sami Mäkelä

غير مقروءة،
15‏/01‏/2016، 10:14:09 ص15‏/1‏/2016
إلى Grails Dev Discuss
Trying to convert application.yml to application.groovy (hate yml syntax for configuration) and there's little issue with the configuration with grails. 

With grails 3.0.11 you get the default configuration, but there's an issue with naming of the parameters. 

spring: 
    groovy: 
        template: 
            check-template-location: false 

converts to: 

spring { 
    groovy { 
        template { 
            check-template-location = false 
        } 
    } 


ConfigSlurper cannot handle the hyphen in the name. 

https://issues.apache.org/jira/browse/GROOVY-3338

So whose idea was it yo use hyphen in the config parameter if you cannot convert that to groovy? 

Or is there a work around to this or am I stuck to the yml config forever?

zyro

غير مقروءة،
15‏/01‏/2016، 10:23:06 ص15‏/1‏/2016
إلى grails-de...@googlegroups.com
try this one:

spring {
groovy {
template {
setProperty "check-template-location", false
> --
> You received this message because you are subscribed to the Google
> Groups "Grails Dev Discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to grails-dev-disc...@googlegroups.com
> <mailto:grails-dev-disc...@googlegroups.com>.
> To post to this group, send email to grails-de...@googlegroups.com
> <mailto:grails-de...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/grails-dev-discuss/8b0459dc-d87a-4df7-87cc-865fc3441996%40googlegroups.com
> <https://groups.google.com/d/msgid/grails-dev-discuss/8b0459dc-d87a-4df7-87cc-865fc3441996%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout.

Sami Mäkelä

غير مقروءة،
15‏/01‏/2016، 10:30:36 ص15‏/1‏/2016
إلى Grails Dev Discuss
Thanks man! Tested it with groovyConsole and that worked like a charm!

الرد على الكل
رد على الكاتب
إعادة توجيه
0 رسالة جديدة