SolveItproblems

SolveITProblems is a project of QFormat.net intellectual club

SolveITProblems это проект интеллектуального клуба QFormat.net

вторник, 15 мая 2012 г.

Externalize Grails DataSource

Hi! Are you tired from changing connection properties and rebuild your application in grails? So take the solution:
Add to your Config.groovy

grails.config.locations = [ "classpath:myown.properties"]


Create file myown.properties and write the following:

dataSource.driverClassName=com.mysql.jdbc.Driver
dataSource.url=jdbc:mysql://localhost/test?useUnicode=true&characterEncoding=utf8
dataSource.username=root
dataSource.password=


You can add anything else too :)
So now you can make changes at your datasource and just restart your application...

Комментариев нет:

Отправить комментарий