Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

CHAPTER 12: Integrating Grails > Grails and Configuration

Grails and Configuration

Using Convention over Configuration (CoC), Grails significantly reduces the amount of configuration you need to do. Crucially, however, it is convention over configuration, not instead of it. There are still a number of different ways you can configure Grails.

Most configuration can be done using Grails' central configuration mechanism. The file grails-app/conf/Config.groovy contains any global configuration for the application. You've already seen this file being used at various points throughout the book. In the following sections, we'll be taking a closer look at how configuration is done with Config.groovy and what configuration options are available to you.

Configuration Basics

The Config.groovy file is a Groovy script that is similar to a regular Java properties file. You can set properties using the dot dereference operator:


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint