Grails
Definition
Grails is an open-source full-stack web application framework for the Java Virtual Machine (JVM), written in Groovy and Jason Rudolph in 2005, Grails brings the productivity of Rails to the JVM. It uses Groovy and graduated as a top-level Apache project (Apache Grails 7).
Key Features
- Convention over configuration: Minimal boilerplate, sensible defaults
- GORM: Object-Relational Mapping layer (supports Hibernate, MongoDB, Neo4j)
- Scaffolding: Auto-generate CRUD interfaces and controllers
- Grails CLI: Command-line tools for project generation and management
- Spring Boot integration: Built on Spring Boot for modern deployment
- RESTful support: Easy JSON/XML API development
- Plugin ecosystem: Hundreds of plugins for common functionality
Architecture
- MVC pattern: Controllers, Views (GSP/Thymeleaf), Domain classes
- GORM: Domain-driven ORM with multiple backends
- Spring Framework: Dependency injection and AOP
- Hibernate: Primary persistence provider
- Gradle: Build and dependency management
Major Versions
| Version | Year | Key Features |
|---|---|---|
| Grails 1 | 2007 | Initial release, GORM, scaffolding |
| Grails 2 | 2010 | Spring Security, asset pipeline |
| Grails 3 | 2015 | Spring Boot integration, Gradle build, GORM 5 |
| Grails 4 | 2019 | Spring Boot 2, GORM 6, Kotlin support |
| Grails 5 | 2021 | Spring Boot 3, GraalVM native images, GORM 8 |
| Grails 7 | 2025 | Apache TLP, full Spring Boot 3.x alignment, license-clean |
Migration to Apache
Grails was migrated to the Apache Software Foundation starting in 2023 and graduated as a top-level project in 2025. This migration involved:
- Removing non-Apache-licensed dependencies
- Cleaning up license headers
- Establishing Apache governance structure
- Grails 7 is the first release under the Apache License 2.0
Licensing
Grails is released under the Apache License 2.0, an OSI-approved permissive open-source license. It is free to use, modify, and distribute for any purpose, including commercial use.
See apache/grails-core for details.
Use Cases
- Enterprise Java web applications
- RESTful API backends
- Rapid application development on the JVM
- Microservices with Spring Boot
- Applications requiring Hibernate/MongoDB/Neo4j persistence