I donโt know if it was answered, but I found that using application.yml does not give me access to the data source configuration, instead it accepted the H2 driver.
build.gradle (dependency block only):
compile "org.springframework.boot:spring-boot-starter-logging" compile "org.springframework.boot:spring-boot-autoconfigure" compile "org.grails:grails-core" compile "org.springframework.boot:spring-boot-starter-actuator" compile "org.springframework.boot:spring-boot-starter-tomcat" compile "org.grails:grails-dependencies" compile "org.grails:grails-web-boot" compile "org.grails.plugins:cache" compile "org.grails.plugins:scaffolding" compile "org.grails.plugins:hibernate4" compile "org.hibernate:hibernate-ehcache" runtime "postgresql:postgresql:9.4.1208-atlassian-hosted" compile "org.grails.plugins:spring-security-core:3.0.4" console "org.grails:grails-console" profile "org.grails.profiles:web:3.1.6" runtime "com.bertramlabs.plugins:asset-pipeline-grails:2.8.2" testCompile "org.grails:grails-plugin-testing" testCompile "org.grails.plugins:geb" testRuntime "org.seleniumhq.selenium:selenium-htmlunit-driver:2.47.1" testRuntime "net.sourceforge.htmlunit:htmlunit:2.18"
Removed everything related to the database from application.yml, and application.groovy is used instead:
dataSource{ pooled= true jmxExport=true driverClassName= 'org.postgresql.Driver' username= 'xxxx' password= 'xxxx' } environments{ development{ dataSource{ dbCreate= 'create-drop' url= "jdbc:postgresql://localhost:5432/xxx" logSql= true hibernate.default_schema= "template_dm" } } test{ dataSource{ dbCreate= 'create-drop' url= "jdbc:postgresql://localhost:5432/xxx" logSql= true hibernate.default_schema= "template_dm" } } production{ dataSource{ dbCreate= 'create-drop' url= "jdbc:postgresql://localhost:5432/xxx" logSql= true hibernate.default_schema= "template_dm" } } }
Hope this helps everyone with the same issue.
Greetings
source share