create-scaffold-controllercommand creates a controller that scaffolds the given domain class, based on convention.
grails create-scaffold-controller grails create-scaffold-controller org.bookstore.Book
DescriptionCreates a dynamic scaffolding controller for the given domain class. If the domain class does not exist, the command will fail. The argument is optional, but if you don't include it the command will ask you for the name of the domain class to scaffold.A controller is responsible for handling incoming web requests and performing actions such as redirects, rendering views and so on. A dynamically scaffolding controller automatically provides a fully-fledged CRUD user interface for a particular domain class, allowing users to create new records, modify them, and delete them.With the second example above, this command will create the file
grails-app/controllers/org/bookstore/BookController.groovythat declares a controller class containing a static
scaffoldproperty. The controller's package is the same as for the domain class and the class name is the domain class name with a 'Controller' suffix.Note that this command is just for convenience and you can also create dynamic scaffolding controllers in your favourite text editor or IDE if you choose.Usage:
grails create-scaffold-controller [name]
CreatedFile- When the controller is created