Playframework and mysql - how to pass connection properties?

from application.conf:

db.default.url=jdbc:mysql://localhost/mydb?characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull&more Conn Properties

      

I am switching from java / spring / wicket to scala / play and I just cannot see how this type of connection transfer goes.

With java / spring I could encapsulate connection properties in some bean and then refer to it using the bean datasource. The props are then passed to the jdbc driver. This way, the url would be clean and the cont-piers were also cleanly defined.

Is there anyway to achieve this with scala / play? through application.conf? via global.scala possible? anything other than that I cannot directly link my props in the url?

+3


source to share





All Articles