In my Config.groovy line Config.groovy I put the line:
grails.config.locations = [ "classpath:app-config.properties"]
where I set the definition for the data source. The file looks like this:
dataSource.url=jdbc:mysql://host/instance dataSource.username=u dataSource.password=p
and it will correctly replace the properties from DataSource.groovy .
The problem is that it replaces the configuration for each environment, but I need a separate configuration for dev, test and production. Trying to write different records to a file, for example:
environments.development.dataSource.url=jdbc:mysql://host/dev ... environments.production.dataSource.url=jdbc:mysql://host/prod ...
ends with the default data source properties defined in DataSource.groovy . How to make one properties file for working with different environments?
Gorky source share