Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added information regarding yml format. #308

Merged
merged 2 commits into from
Jul 8, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions src/en/guide/conf/config/ymlOptions.gdoc
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}
1 change: 1 addition & 0 deletions src/en/guide/toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ conf:
title: Configuration
config:
title: Basic Configuration
ymlOptions: Options for the yml format Config
builtInOptions: Built in options
logging: Logging
configGORM: GORM
Expand Down