source: trunk/grails-app/conf/BootStrap.groovy @ 564

Last change on this file since 564 was 508, checked in by gav, 15 years ago

Base data is now created during bootstrap in all environments.
Add stdout log appender to test environment.
Add CreateDataServiceTests.

File size: 1.1 KB
RevLine 
[149]1class BootStrap
[58]2{
[149]3    def createDataService
[58]4
5    def init = { servletContext ->
6
[504]7        /** Environment specific settings.
8        * Note that (circa grails-1.2.2) if running "test test-app integration:" from "grails interactive"
9        * the correct environment is applied for DataSource and Config,
10        * but for BootStrap (and others) the development environment is applied.
11        */
12        environments {
13            development {
14                log.info "Starting DEVELOPMENT bootstrap."
15                createDataService.ensureSystemAndAdminAccess()
16                createDataService.createBaseData()
17                createDataService.createDemoData()
18            }
19            test {
20                log.info "Starting TEST bootstrap."
21                createDataService.ensureSystemAndAdminAccess()
[508]22                createDataService.createBaseData()
[504]23            }
24            production {
25                log.info "Starting PRODUCTION bootstrap."
26                createDataService.ensureSystemAndAdminAccess()
[508]27                createDataService.createBaseData()
[504]28            }
[58]29        }
[149]30
[504]31    } // init
[58]32
33    def destroy = {
34    }
[504]35
36} // end class
Note: See TracBrowser for help on using the repository browser.