Grails - Interactive Mode



Description

It runs the JVM and provides the commands for quicker execution. Type the grails at command line to activate the interactive mode and use the TAB completion to specify the different command types.

Grails Interactive Mode

You can also create a service by using the below command:

 
grails> create-service [name]

For instance, we will create a service class "team" and "players" will be the associated unit test for the given base name:

Grails Interactive Mode Service

The above command creates the service under grails-app/services folder and its associated unit test of a service will be created under src/test folder.

You can list down the other commands to run external process by using the below command:

 
grails> !ls
Grails Interactive Mode ls

To exit from the interactive mode, use the exit command which will exit from the interactive mode console by terminating the JVM.

Advertisements