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

Last change on this file since 613 was 571, checked in by gav, 14 years ago

Start lucene mirroring and index after creating bootstrap data.

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