Reputation: 1543
I am trying to use Spring Cloud Config Server to externalize my Grails 3 (personnel) application configuration, but I cannot seem to set the dataSource properties.
Currently, I can load other properties (sample.message
) into my Grails 3 (personnel) application and retrieve them using grailsApplication.config.sample.message
without an issue. And hitting the REST endpoint on the Config Server (localhost:8888/personnel/master
) is showing the configuration information I want, so I'm a bit confused.
I have tried each of the following in my personnel.properties
file in my Git repo:
datasource.user=example
datasource.password=example
grails.datasource.user=example
grails.datasource.password=example
spring.datasource.user=example
spring.datasource.password=example
But none of them work. I continue to see error messages saying sa@localhost (using password: no)
suggesting that the datasource properties, in particular, are not working.
I know it is possible with spring-boot-starter-data-jpa
, so I'm wondering:
datasource.user
, grails.datasource.user
, spring.datasource.user
, etc?Upvotes: 1
Views: 384
Reputation: 1543
After Shashank's edit, I realized that it was an issue with my property settings. datasource
should have been dataSource
and user
should be username
. Once those corrections were made, the application (personnel) worked perfectly. So,
personnel.properties
dataSource.username=example
dataSource.password=example
dataSource.url=jdbc:mysql://localhost:3306/personnel
Upvotes: 1