Configuring a Database

The in-memory database that comes with Grails is handy, and we have been making good use of it, but a time comes in the life of any application when you need to store your data in a real database. (Let’s hope this happens before you go to production.) As with most things, Grails makes this a snap to do.

“Configuration?” You may be wondering what happened to “convention over configuration.” Well, keep in mind that it’s over, not instead of, and, besides, no matter how hard Larry Ellison tries, there’s still no convention for which database to use.[48] Also, Grails takes much of the pain out of the word configuration by allowing us to write all of our configuration code in Groovy instead of XML. The information about our ...

Get Grails 2: A Quick-Start Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.