{"action":"created","issue":{"url":"https://api.github.com/repos/grails/grails-core/issues/712","labels_url":"https://api.github.com/repos/grails/grails-core/issues/712/labels{/name}","comments_url":"https://api.github.com/repos/grails/grails-core/issues/712/comments","events_url":"https://api.github.com/repos/grails/grails-core/issues/712/events","html_url":"https://github.com/grails/grails-core/issues/712","id":78107943,"number":712,"title":"application.groovy config is ignored","user":{"login":"SmirnoffYM","id":1008137,"avatar_url":"https://avatars.githubusercontent.com/u/1008137?v=3","gravatar_id":"","url":"https://api.github.com/users/SmirnoffYM","html_url":"https://github.com/SmirnoffYM","followers_url":"https://api.github.com/users/SmirnoffYM/followers","following_url":"https://api.github.com/users/SmirnoffYM/following{/other_user}","gists_url":"https://api.github.com/users/SmirnoffYM/gists{/gist_id}","starred_url":"https://api.github.com/users/SmirnoffYM/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SmirnoffYM/subscriptions","organizations_url":"https://api.github.com/users/SmirnoffYM/orgs","repos_url":"https://api.github.com/users/SmirnoffYM/repos","events_url":"https://api.github.com/users/SmirnoffYM/events{/privacy}","received_events_url":"https://api.github.com/users/SmirnoffYM/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-05-19T14:19:53Z","updated_at":"2015-05-19T14:31:29Z","closed_at":null,"body":"I've created a new grails 3.0.1 application, but replaced default *application.yml* with custom *application.groovy* config. Besides old default grails configuration (gsps, mime types and so on), there are dataSource and environments settings here:\r\n\r\n    dataSource {\r\n        pooled = true\r\n        jmxExport = true\r\n        driverClassName = 'org.postgresql.Driver'\r\n        dialect = org.hibernate.dialect.PostgreSQL9Dialect\r\n        username = 'postgres'\r\n        password = '1234'\r\n    }\r\n    environments {\r\n        development {\r\n            dataSource {\r\n                dbCreate = 'validate'\r\n                url = 'jdbc:postgresql://localhost:5432/mydb'\r\n            }\r\n        }\r\n    \r\n        production {\r\n            dataSource {\r\n                dbCreate = 'validate'\r\n                url = 'jdbc:postgresql://localhost:5432/mydb'\r\n            }\r\n        }\r\n    }\r\n\r\nBut when I start the application \r\n\r\n    gradle clean run\r\n\r\ngrails decides to use H2 db settings for some reason.\r\n\r\n    2015-May-19 16:59:52 INFO Dialect#<init>:145 - HHH000400: Using dialect: org.hibernate.dialect.H2Dialect\r\n\r\nI've tried to output grailsApplication.config properties inside the BootStrap#init() method and got this:\r\n\r\n    dataSource.driverClassName = org.h2.Driver\r\n    environments.development.dataSource.url = jdbc:h2:mem:devDb;MVCC=TRUE;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE\r\n    environments.production.dataSource.url = jdbc:h2:prodDb;MVCC=TRUE;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE\r\n    environments.test.dataSource.dbCreate = update\r\n\r\nand so on. The most interesting thing is that if I use default *application.yml* with similarly changed dataSource and environments sections (db url, driver etc) - it works as expected! \r\nMaybe grails just ignores *application.groovy* file and/or uses some *plugin.yml* (from *org.grails.plugins:cache:3.0.1*) instead of it?"},"comment":{"url":"https://api.github.com/repos/grails/grails-core/issues/comments/103524227","html_url":"https://github.com/grails/grails-core/issues/712#issuecomment-103524227","issue_url":"https://api.github.com/repos/grails/grails-core/issues/712","id":103524227,"user":{"login":"jeffbrown","id":15482,"avatar_url":"https://avatars.githubusercontent.com/u/15482?v=3","gravatar_id":"","url":"https://api.github.com/users/jeffbrown","html_url":"https://github.com/jeffbrown","followers_url":"https://api.github.com/users/jeffbrown/followers","following_url":"https://api.github.com/users/jeffbrown/following{/other_user}","gists_url":"https://api.github.com/users/jeffbrown/gists{/gist_id}","starred_url":"https://api.github.com/users/jeffbrown/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeffbrown/subscriptions","organizations_url":"https://api.github.com/users/jeffbrown/orgs","repos_url":"https://api.github.com/users/jeffbrown/repos","events_url":"https://api.github.com/users/jeffbrown/events{/privacy}","received_events_url":"https://api.github.com/users/jeffbrown/received_events","type":"User","site_admin":false},"created_at":"2015-05-19T14:31:28Z","updated_at":"2015-05-19T14:31:28Z","body":"> application.groovy config is ignored\r\n\r\nIs it really the case that `application.groovy` is ignored, or is it just that `dataSource` properties in particular are not being respected from there?  The latter makes more sense to me than the former.  Is that what is happening?"}}