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

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

Apply bug fix for ticket #76.
Rename all instances of Lucene to Searchable.
Improved global directory config.
Add log levels for searchable plugin and compass.

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