4.1.1 Options for the yml format Config - Reference Documentation
Authors: Graeme Rocher, Peter Ledbrook, Marc Palmer, Jeff Brown, Luke Daley, Burt Beckwith, Lari Hotari
Version: 3.1.9
4.1.1 Options for the yml format Config
application.yml was introduced in Grails 3.0 for an alternative format for the configuration tasks.Using system properties / command line arguments
Suppose you are using theJDBC_CONNECTION_STRING command line argument and you want to access the same in the yml file then it can be done in the following manner:production:
dataSource:
url: '${JDBC_CONNECTION_STRING}'build.gradle to modify the bootRun target if grails run-app is used to start the applicationrun {
systemProperties = System.properties
}test task as followstest {
systemProperties = System.properties
}