[55] | 1 | dataSource { |
---|
[171] | 2 | // Open separate connections to database for every request or pool connections. |
---|
[148] | 3 | pooled = true |
---|
[55] | 4 | } |
---|
| 5 | hibernate { |
---|
| 6 | cache.use_second_level_cache=true |
---|
[178] | 7 | cache.use_query_cache=true |
---|
[449] | 8 | cache.provider_class='net.sf.ehcache.hibernate.EhCacheProvider' |
---|
[55] | 9 | } |
---|
[81] | 10 | |
---|
[174] | 11 | // dbCreate options. |
---|
| 12 | // create-drop: Drop and re-create the database tables on restart. Deletes existing data. |
---|
[149] | 13 | // create: Create the database if it doesn't exist, but don't modify it if it does. Deletes existing data. |
---|
| 14 | // update: Create the database if it doesn't exist, and modify it if it does exist. Keep data. |
---|
[174] | 15 | // If nothing specified then do nothing to database schema. |
---|
| 16 | |
---|
| 17 | // Environment specific settings. |
---|
[923] | 18 | // All production config is in external config. |
---|
[55] | 19 | environments { |
---|
[148] | 20 | development { |
---|
| 21 | dataSource { |
---|
| 22 | /** HSQLDB - In memory */ |
---|
[149] | 23 | driverClassName = "org.hsqldb.jdbcDriver" |
---|
| 24 | username = "sa" |
---|
| 25 | password = "" |
---|
[81] | 26 | dbCreate = "create-drop" |
---|
[504] | 27 | url = "jdbc:hsqldb:mem:devDb" |
---|
[148] | 28 | /** MySQL */ |
---|
[878] | 29 | // dialect = org.hibernate.dialect.MySQL5InnoDBDialect |
---|
[149] | 30 | // driverClassName = "com.mysql.jdbc.Driver" |
---|
| 31 | // username = "gnumimsadmin" |
---|
| 32 | // password = "gnumimsadmin" |
---|
[148] | 33 | // dbCreate = "create-drop" |
---|
[176] | 34 | // url = "jdbc:mysql://host:3306/gnumims_dev?autoReconnect=true&sessionVariables=storage_engine=InnoDB" |
---|
[148] | 35 | } |
---|
| 36 | } |
---|
| 37 | test { |
---|
| 38 | dataSource { |
---|
| 39 | /** HSQLDB - In memory */ |
---|
[149] | 40 | driverClassName = "org.hsqldb.jdbcDriver" |
---|
| 41 | username = "sa" |
---|
| 42 | password = "" |
---|
[148] | 43 | dbCreate = "update" |
---|
| 44 | url = "jdbc:hsqldb:mem:devDb" |
---|
| 45 | /** MySQL */ |
---|
[878] | 46 | // dialect = org.hibernate.dialect.MySQL5InnoDBDialect |
---|
[149] | 47 | // driverClassName = "com.mysql.jdbc.Driver" |
---|
| 48 | // username = "gnumimsadmin" |
---|
| 49 | // password = "gnumimsadmin" |
---|
[148] | 50 | // dbCreate = "update" |
---|
[176] | 51 | // url = "jdbc:mysql://host:3306/gnumims_test?autoReconnect=true&sessionVariables=storage_engine=InnoDB" |
---|
[148] | 52 | } |
---|
| 53 | } |
---|
[923] | 54 | } |
---|