![Grails Tutorial](/grails/images/grails-mini-logo.jpg)
- Grails Tutorial
- Grails - Home
- Grails - Overview
- Grails - MVC Architecture
- Grails - Creating an Application
- Grails - The Command Line
- Grails - Application Profiles
- Object Relational Mapping (GORM)
- Grails - The Web Layer
- Grails - Groovy Server Pages
- Grails - Web Services
- Grails - Validation
- Grails - Plugins
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](/grails/images/grails_interactive_mode.jpg)
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](/grails/images/grails_interactive_mode_service.jpg)
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](/grails/images/grails_interactive_mode_ls.jpg)
To exit from the interactive mode, use the exit command which will exit from the interactive mode console by terminating the JVM.
Advertisements