source:
trunk/grails-app/conf/BootStrap.groovy
@
256
| Last change on this file since 256 was 230, checked in by , 16 years ago | |
|---|---|
| File size: 831 bytes | |
| Rev | Line | |
|---|---|---|
| [58] | 1 | import grails.util.GrailsUtil |
| [55] | 2 | |
| [149] | 3 | class BootStrap |
| [58] | 4 | { |
| [149] | 5 | def createDataService |
| [58] | 6 | |
| 7 | def init = { servletContext -> | |
| 8 | ||
| [230] | 9 | log.info "Application starting." |
| [199] | 10 | log.debug "GrailsUtil.environment = ${GrailsUtil.environment}" |
| [149] | 11 | |
| [58] | 12 | switch (GrailsUtil.environment) |
| 13 | { | |
| 14 | case "development": | |
| [199] | 15 | createDataService.ensureSystemAndAdminAccess() |
| [149] | 16 | createDataService.createBaseData() |
| 17 | createDataService.createDemoData() | |
| [58] | 18 | break |
| 19 | case "test": | |
| [199] | 20 | createDataService.ensureSystemAndAdminAccess() |
| [58] | 21 | break |
| 22 | case "production": | |
| [199] | 23 | createDataService.ensureSystemAndAdminAccess() |
| [58] | 24 | break |
| 25 | } | |
| [149] | 26 | |
| [58] | 27 | } |
| 28 | ||
| 29 | def destroy = { | |
| 30 | } | |
| 31 | } |
Note: See TracBrowser
for help on using the repository browser.
