A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
how to read .properties file in grails ?
Joined: Feb 26, 2012
Oct 23, 2013 04:41:44
How to read .properties file which is in WEB-APP folder in grails ?
please help me....
Joined: Nov 23, 2013
Nov 23, 2013 15:25:54
This is simple:
Let's assume you have a certain property file with one property: my.property="property"
You should specify your property file in Config.groovy
grails.config.locations = ["config_file_1.properties", "config_file_2.properties", ..]
After that using DI you'll get in your grails application:
def prop = grailsApplictaion.config['my.property']
I agree. Here's the link:
subject: how to read .properties file in grails ?
Reading properties from another properties file.
Problem with multiple grails app on glassfish.
Grails 1.0 Web Application Development - TOC
Read duplicate keys from properties file
Passing parameters to Quartz job
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014