mardi 3 mars 2015

Spring data with JPA (mySQL) - changing the data source dynamically

We are using a spring MVC web application with a single data source (MySQL). We have a new requirement now:


We would like that some of our clients will use as their data source - machine#1's MySQL db.


And other clients should use as their data source - machine#2's MySQL db.


both of these data sources are identical in structure, only with different data.


This 2 different machines contain databases of two different customers that do not want to share the same database for obvious reasons.


Is that possible to do with minimal change of our code base?


Aucun commentaire:

Enregistrer un commentaire