source: branches/features/grailsUpgrade/grails-app/conf/BootStrap.groovy @ 889

Last change on this file since 889 was 876, checked in by gav, 14 years ago

Upgrade branches/features/grailsUpgrade to Grails-1.3.5, including plugin upgrades and some todo removals.

File size: 1.3 KB
Line 
1class BootStrap
2{
3    def createDataService
4
5    def init = { servletContext ->
6
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                createDataService.startSearchableIndex()
19            }
20            test {
21                log.info "Starting TEST bootstrap."
22                createDataService.ensureSystemAndAdminAccess()
23                createDataService.createBaseData()
24                createDataService.startSearchableIndex(false)
25            }
26            production {
27                log.info "Starting PRODUCTION bootstrap."
28                createDataService.ensureSystemAndAdminAccess()
29                createDataService.createBaseData()
30                createDataService.startSearchableIndex()
31            }
32        }
33
34    } // init
35
36    def destroy = {
37    }
38
39} // end class
Note: See TracBrowser for help on using the repository browser.