Last change
on this file since 166 was
149,
checked in by gav, 15 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
|
Line | |
---|
1 | import grails.util.GrailsUtil |
---|
2 | |
---|
3 | class BootStrap |
---|
4 | { |
---|
5 | def createDataService |
---|
6 | |
---|
7 | def init = { servletContext -> |
---|
8 | |
---|
9 | println "**** BootStrap GrailsUtil.environment = ${GrailsUtil.environment}" |
---|
10 | |
---|
11 | switch (GrailsUtil.environment) |
---|
12 | { |
---|
13 | case "development": |
---|
14 | createDataService.ensureAdminAccess() |
---|
15 | createDataService.createBaseData() |
---|
16 | createDataService.createDemoData() |
---|
17 | break |
---|
18 | case "test": |
---|
19 | createDataService.ensureAdminAccess() |
---|
20 | break |
---|
21 | case "production": |
---|
22 | createDataService.ensureAdminAccess() |
---|
23 | break |
---|
24 | } |
---|
25 | |
---|
26 | } |
---|
27 | |
---|
28 | def destroy = { |
---|
29 | } |
---|
30 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.