source:
trunk/grails-app/conf/BootStrap.groovy
@
202
Last change on this file since 202 was 199, checked in by , 15 years ago | |
---|---|
File size: 790 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 | ||
[199] | 9 | log.debug "GrailsUtil.environment = ${GrailsUtil.environment}" |
[149] | 10 | |
[58] | 11 | switch (GrailsUtil.environment) |
12 | { | |
13 | case "development": | |
[199] | 14 | createDataService.ensureSystemAndAdminAccess() |
[149] | 15 | createDataService.createBaseData() |
16 | createDataService.createDemoData() | |
[58] | 17 | break |
18 | case "test": | |
[199] | 19 | createDataService.ensureSystemAndAdminAccess() |
[58] | 20 | break |
21 | case "production": | |
[199] | 22 | createDataService.ensureSystemAndAdminAccess() |
[58] | 23 | break |
24 | } | |
[149] | 25 | |
[58] | 26 | } |
27 | ||
28 | def destroy = { | |
29 | } | |
30 | } |
Note: See TracBrowser
for help on using the repository browser.