Converting application.yml to application.groovy

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Converting application.yml to application.groovy

Sami Mäkelä
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?

--
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/grails-dev-discuss/8b0459dc-d87a-4df7-87cc-865fc3441996%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Converting application.yml to application.groovy

zyro
try this one:

spring {
      groovy {
          template {
              setProperty "check-template-location", false
          }
      }
}

-------- Original Message  --------
Subject: Converting application.yml to application.groovy
From: Sami Mäkelä <[hidden email]>
To: Grails Dev Discuss <[hidden email]>
Date: Fri, 15 Jan 2016 07:14:09 -0800 (pst)

> 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?
>
> --
> 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 [hidden email]
> <mailto:[hidden email]>.
> To post to this group, send email to [hidden email]
> <mailto:[hidden email]>.
> 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.

--
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/grails-dev-discuss/56990ED8.6000802%40zyro.net.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Converting application.yml to application.groovy

Sami Mäkelä
Thanks man! Tested it with groovyConsole and that worked like a charm!


On Friday, 15 January 2016 17:23:06 UTC+2, zyro wrote:
try this one:

spring {
      groovy {
          template {
              setProperty "check-template-location", false
          }
      }
}

-------- Original Message  --------
Subject: Converting application.yml to application.groovy
From: Sami Mäkelä <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="Q_wn6mqGAQAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">sami.t...@...>
To: Grails Dev Discuss <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="Q_wn6mqGAQAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">grails-de...@googlegroups.com>
Date: Fri, 15 Jan 2016 07:14:09 -0800 (pst)

> 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.
>
> <a href="https://issues.apache.org/jira/browse/GROOVY-3338" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\75https%3A%2F%2Fissues.apache.org%2Fjira%2Fbrowse%2FGROOVY-3338\46sa\75D\46sntz\0751\46usg\75AFQjCNFKsxiMlXrfDjb0trx2vb7FFB0QUQ&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\75https%3A%2F%2Fissues.apache.org%2Fjira%2Fbrowse%2FGROOVY-3338\46sa\75D\46sntz\0751\46usg\75AFQjCNFKsxiMlXrfDjb0trx2vb7FFB0QUQ&#39;;return true;">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?
>
> --
> 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 <a href="javascript:" target="_blank" gdf-obfuscated-mailto="Q_wn6mqGAQAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">grails-dev-discuss+unsubscribe@...
> <mailto:<a href="javascript:" target="_blank" gdf-obfuscated-mailto="Q_wn6mqGAQAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">grails-dev-discuss+unsubscribe@...>.
> To post to this group, send email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="Q_wn6mqGAQAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">grails-de...@googlegroups.com
> <mailto:<a href="javascript:" target="_blank" gdf-obfuscated-mailto="Q_wn6mqGAQAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">grails-de...@googlegroups.com>.
> To view this discussion on the web visit
> <a href="https://groups.google.com/d/msgid/grails-dev-discuss/8b0459dc-d87a-4df7-87cc-865fc3441996%40googlegroups.com" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/grails-dev-discuss/8b0459dc-d87a-4df7-87cc-865fc3441996%40googlegroups.com&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/grails-dev-discuss/8b0459dc-d87a-4df7-87cc-865fc3441996%40googlegroups.com&#39;;return true;">https://groups.google.com/d/msgid/grails-dev-discuss/8b0459dc-d87a-4df7-87cc-865fc3441996%40googlegroups.com
> <<a href="https://groups.google.com/d/msgid/grails-dev-discuss/8b0459dc-d87a-4df7-87cc-865fc3441996%40googlegroups.com?utm_medium=email&amp;utm_source=footer" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/grails-dev-discuss/8b0459dc-d87a-4df7-87cc-865fc3441996%40googlegroups.com?utm_medium\75email\46utm_source\75footer&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/grails-dev-discuss/8b0459dc-d87a-4df7-87cc-865fc3441996%40googlegroups.com?utm_medium\75email\46utm_source\75footer&#39;;return true;">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 <a href="https://groups.google.com/d/optout" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">https://groups.google.com/d/optout.

--
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/grails-dev-discuss/a01fb217-772d-42eb-84f0-81e968a333f5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.