-
Notifications
You must be signed in to change notification settings - Fork 539
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #308 from anshbansal/patch-27
Added information regarding yml format.
- Loading branch information
Showing
2 changed files
with
22 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
@application.yml@ was introduced in Grails 3.0 for an alternative format for the configuration tasks. | ||
|
||
h3. Using system properties / command line arguments | ||
|
||
Suppose you are using the @JDBC_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: | ||
|
||
{code:java} | ||
production: | ||
dataSource: | ||
url: '${JDBC_CONNECTION_STRING}' | ||
{code} | ||
|
||
Similarly system arguments can be accessed. | ||
|
||
You will need to have this in @build.gradle@ to modify the @bootRun@ target if @grails run-app@ is used to start the application | ||
|
||
{code:java} | ||
run { | ||
systemProperties = System.properties | ||
} | ||
{code} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters