I am using Spring Java Based configuration for configure multiple database with Spring Data. In the configuration file, i am creating two data source for MySQ
data source
MySQ
I my case, the configuration was on a xml file, so I only have to add the primary="true" to the bean tag of one of the defined datasources.