Introduction to Grails 6
Grails 6 builds on Groovy and Micronaut to provide a fast, convention-driven web framework on the JVM. It emphasizes:
- Convention over configuration
- Productivity with GORM and code generation
- Fast startup and DI courtesy of Micronaut
Install
Recommended: SDKMAN
curl -s "https://get.sdkman.io" | bash
source "$HOME/.sdkman/bin/sdkman-init.sh"
sdk install grails 6.0.0
Create a new app
grails create-app bookstore --profile web
cd bookstore
grails run-app
Project layout
Key folders:
grails-app/domain— domain classesgrails-app/controllers— controllersgrails-app/views— GSP & JSON viewssrc/main/groovy— plain Groovy classes