Last change
on this file since 506 was
504,
checked in by gav, 15 years ago
|
Adjust BootStrap.groovy since it is now environment aware.
Small spelling correction to DataSource?.groovy
|
File size:
1.0 KB
|
Rev | Line | |
---|
[149] | 1 | class 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() |
---|
| 22 | } |
---|
| 23 | production { |
---|
| 24 | log.info "Starting PRODUCTION bootstrap." |
---|
| 25 | createDataService.ensureSystemAndAdminAccess() |
---|
| 26 | } |
---|
[58] | 27 | } |
---|
[149] | 28 | |
---|
[504] | 29 | } // init |
---|
[58] | 30 | |
---|
| 31 | def destroy = { |
---|
| 32 | } |
---|
[504] | 33 | |
---|
| 34 | } // end class |
---|
Note: See
TracBrowser
for help on using the repository browser.