|
Last change
on this file since 177 was
149,
checked in by gav, 16 years ago
|
|
Refactor bootstrap data generation to new CreateDataService?.
Tweak security annotations so that ROLE_AppAdmin gives access to all areas.
Rework DataSource? to allow building of prod and dev WARs.
Include MySQL jdbc connector which is GNU GPL'd and used in the prod WAR.
|
|
File size:
772 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 | |
|---|
| 9 | println "**** BootStrap GrailsUtil.environment = ${GrailsUtil.environment}" |
|---|
| [149] | 10 | |
|---|
| [58] | 11 | switch (GrailsUtil.environment) |
|---|
| 12 | { |
|---|
| 13 | case "development": |
|---|
| [149] | 14 | createDataService.ensureAdminAccess() |
|---|
| 15 | createDataService.createBaseData() |
|---|
| 16 | createDataService.createDemoData() |
|---|
| [58] | 17 | break |
|---|
| 18 | case "test": |
|---|
| [149] | 19 | createDataService.ensureAdminAccess() |
|---|
| [58] | 20 | break |
|---|
| 21 | case "production": |
|---|
| [149] | 22 | createDataService.ensureAdminAccess() |
|---|
| [58] | 23 | break |
|---|
| 24 | } |
|---|
| [149] | 25 | |
|---|
| [58] | 26 | } |
|---|
| 27 | |
|---|
| 28 | def destroy = { |
|---|
| 29 | } |
|---|
| 30 | } |
|---|
Note: See
TracBrowser
for help on using the repository browser.