Posts Tagged ‘datasource’

Externalize datasource configuration in Grails

March 11, 2010

the following seems to work to externalize datasource configuartion (see
1) you add the grails.config.locations property in the Config.groovy like below

grails.config.locations = [ //”classpath:${appName}”,

Notice: I have added the file is users file system , so the user can change it, without touching the war file . Restarting the app should pick up the new value
2) in the ${appName}” file

dataSource.driverClassName = com.mysql.jdbc.Driver

Notice no quotes in the value
I am using grails 1.2.1