(Quick Reference)

console

Purpose

Starts an instance of the Swing graphical Groovy console with an initialized Grails runtime.

Examples

grails console

Description

Starts the Grails console, which is an extended version of the regular Groovy console. There are a couple of useful variables registered in the binding:

  • ctx - The Spring ApplicationContext instance
  • grailsApplication - The GrailsApplication instance

These are useful as they allow access to the conventions within Grails and Spring beans.

Usage:

grails [environment]* console

Fired Events:

  • StatusFinal - When the console is loaded