Grails config files: best practice -


Just thinking what's the 'best practice' when adding config key-value pairs to your tree's app.

You should just add to Config.groovy or create a new file.

I tried to create a new config file (company .groovy) but could not access config props from my app. However, when I place the properties in Paper Paper Paper Papergroups GRVOV I have use them .... This work is fine, but I do not want Config.groovy to get very big. Apart from this, another problem raised my head raising integration test, I found that my new config property (value was zero) in 'test' env did not have access.

Any advice I should make something wrong by default is appreciated.

Thank you, D

I'm not sure the specific best practices are you plugins I can say that just add some options that are commonly used to reconfigure groovy, but those who require more complex configuration (i.e. nimble) usually have their own files which can be different, In your special requirements and amounts on the configuration The Irbr which you want to add.

If you check Config.groovy, you will see some top rows (reproduced here) that you can specify that Grails will look for configuration files. It can automatically merge the property and .groovy files for you.

  // Places to search config files that are merged into the main configuration / config files, they are either java property files or configuration scripts / grails.config.locations = [ "Classpath: $ {AppName} -config.properties", // "classpath: $ {appName} -config.groovy", // "file: $ {userHome} /. Grails / $ {appName} -config.properties" , // "File: $ {userHome} /. Grails / $ {appName} -config.groovy"]  

describes the option for you


Comments

Popular posts from this blog

c# - How to capture HTTP packet with SharpPcap -

php - Multiple Select with Explode: only returns the word "Array" -

php - jQuery AJAX Post not working -