Reputation: 183
I understand some of the benefits with using Spring's JPA such as taking advantage of Crud and JPA repository functions to effortlessly access a data source. This seems lost when multiple data sources are to be used. I've seen various examples on how to do this, but the added time to create a bunch of classes for each data source seems excessive.
Why should we take the time to use Spring's JPA to configure multiple data sources when can just use POJO methods?
Thanks.
Upvotes: 0
Views: 864
Reputation: 736
JPA also abstracts you from the implementation and store engine with different dialects. You can add abstraction layers on top of it to abstract from the actual different datasources, although I don't think the schema is shared, so you endup needing pojos in any case as dtos.
What do you mean by POJO methods?
Anyway, I don't think this is a question for stack overflow
Upvotes: 1