Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Minor
-
Resolution: Cannot Reproduce
-
Affects Version/s: 1.1.1
-
Fix Version/s: None
-
Component/s: Configuration
-
Labels:None
-
Environment:OS X, Linux
Description
If I wrap the assignment of "grails.config.locations" with an "environments" block it no longer gets assigned. If the assignment is not wrapped in an "environments" block then it seems to work fine.
grails.config.locations = ["classpath:${appName}-config.properties"]
println "grails.config.locations = ${grails.config.locations}"
results in:
grails.config.locations = [classpath:ws-config.properties]
However,
environments {
production {
grails.config.locations = ["classpath:${appName}-config.properties"]
}
development {
grails.config.locations = ["classpath:${appName}-config.properties"]
}
test {
grails.config.locations = ["classpath:${appName}-config.properties"]
}
}
println "grails.config.locations = ${grails.config.locations}"
results in:
grails.config.locations = [:]
Activity
- All
- Comments
- Work Log
- History
- Activity
- Git Commits
It seems like you are testing by printing the config value in the config script, which is never going to work.
I tried this out and the 'grails.config.locations' property is definitely resolved for the environment like any other config property.