spring-cloud / spring-cloud-connectors

Library to let cloud applications connect to services
Apache License 2.0
185 stars 161 forks source link

Allow setting connection parameters for JDBC connections #117

Closed jbcpollak closed 9 years ago

jbcpollak commented 9 years ago

I am using Spring Cloud with Pivotal Web Services and a ClearDB provided MySQL database. It seems the connection is not using utf8, and I cannot figure out how to set it.

Traditionally with Spring Boot you would do something like this:

spring.datasource.url=jdbc:mysql://localhost:13306/app_dev?autoReconnect=true&characterEncoding=utf8

How can you do this with cloud connectors?

ramnivas commented 9 years ago

Take a look at (towards the end of) https://spring.io/blog/2014/06/03/introducing-spring-cloud as well as a test case that illustrates the solution.