Guest User

Untitled

a guest
Aug 5th, 2018
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.57 KB | None | 0 0
  1. Using MySQL with Grails 2.0 - finding external connector .jar
  2. dataSource {
  3. pooled = true
  4. //driverClassName = "org.h2.Driver"
  5. //username = "sa"
  6. //password = ""
  7. driverClassName = "com.mysql.jdbc.Driver"
  8. username = "bob"
  9. password = "password"
  10. }
  11. hibernate {
  12. cache.use_second_level_cache = true
  13. cache.use_query_cache = true
  14. cache.region.factory_class = 'net.sf.ehcache.hibernate.EhCacheRegionFactory'
  15. }
  16. // environment specific settings
  17. environments {
  18. development {
  19. dataSource {
  20. //dbCreate = "create-drop" // one of 'create', 'create-drop', 'update', 'validate', ''
  21. //url = "jdbc:h2:mem:devDb;MVCC=TRUE"
  22. dbCreate = "update" // one of 'create', 'create-drop', 'update', 'validate', ''
  23. url = "jdbc:mysql://localhost:3306/tekevent"
  24. }
  25. }
  26. test {
  27. dataSource {
  28. dbCreate = "create-drop"
  29. url = "jdbc:h2:mem:testDb;MVCC=TRUE"
  30. }
  31. }
  32. production {
  33. dataSource {
  34. dbCreate = "update"
  35. url = "jdbc:h2:prodDb;MVCC=TRUE"
  36. pooled = true
  37. properties {
  38. maxActive = -1
  39. minEvictableIdleTimeMillis=1800000
  40. timeBetweenEvictionRunsMillis=1800000
  41. numTestsPerEvictionRun=3
  42. testOnBorrow=true
  43. testWhileIdle=true
  44. testOnReturn=true
  45. validationQuery="SELECT 1"
  46. }
  47. }
  48. }
  49. }
  50.  
  51. repositories {
  52. ...
  53. mavenCentral()
  54. }
  55.  
  56. dependencies {
  57. ...
  58. runtime 'mysql:mysql-connector-java:5.1.16'
  59. }
Add Comment
Please, Sign In to add comment