(Quick Reference)

html-generate-controllers

Purpose

Generate controller for static scaffolding for a given domain class. Generated controller provides JSON GETfull service. The controller renders as JSON.

Examples

grails html-generate-controllers org.bookstore.Book

Description

Grails supports a feature known as static scaffolding which involves the generation of a CRUD (Create/Read/Update/Delete) interface for a given domain class. Once generated, the controller can be modified by you but they won't automatically update when you change the domain class.

Usage:

grails html-generate-controllers <domainClassName>

Required arguments:

  • domainClassName - is the full name of the domain class including package name.

The command depends on install-templates command. It will copy the templates Grails uses for all code generation activities to the application's src/templates directory.