Reputation: 3898
I have a Property file under grails-app/conf with name config.properties
In my Config.groovy, I have properties as this
dfs.replication = '1'
In my Config.groovy, i have the following code
grails.config.locations = ["classpath:config.properties",
"classpath:config-${stage}.properties",
// "file:${configLocation}",
"${catalina.base}/../config/config.properties"
]
When I try to read grailsApplication.config.dfs.replication
I get below Error
Method threw 'groovy.lang.MissingPropertyException' exception.
Please help
Upvotes: 0
Views: 147
Reputation: 3898
I had missed out on Autowiring grailsApplication in my Groovy File.
After Autowiring grailsApplication, it worked for me.
Thanks Vinod
Upvotes: 0