Last change
on this file since 538 was
508,
checked in by gav, 15 years ago
|
Base data is now created during bootstrap in all environments.
Add stdout log appender to test environment.
Add CreateDataServiceTests.
|
File size:
1.1 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 | createDataService.createBaseData() |
---|
23 | } |
---|
24 | production { |
---|
25 | log.info "Starting PRODUCTION bootstrap." |
---|
26 | createDataService.ensureSystemAndAdminAccess() |
---|
27 | createDataService.createBaseData() |
---|
28 | } |
---|
29 | } |
---|
30 | |
---|
31 | } // init |
---|
32 | |
---|
33 | def destroy = { |
---|
34 | } |
---|
35 | |
---|
36 | } // end class |
---|
Note: See
TracBrowser
for help on using the repository browser.