API / Apache Grails Interview questions
What are the types of environments Grails supports?
Grails ships with three built-in environments — development, test, and production — each of which can carry its own configuration block (database connection, logging level, cache settings) inside the application's configuration file, so the same codebase behaves appropriately in each context without code changes.
| Environment | Typical use |
| development | Local coding, verbose logging, an in-memory or local database, hot-reload enabled |
| test | Running the automated test suite, typically an isolated/in-memory database |
| production | Live deployment, optimized settings, minimal logging noise, a real database |
Custom environments beyond these three can also be defined for cases like a staging server, and the active environment is selected either through the Grails command line (e.g. running with a specific environment flag) or via a system property, letting the exact same build artifact be promoted through staging and production without rebuilding it differently for each.
More Related questions...