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