I have one doubt about implementation of spring data, have basic knowledge about spring data. I understand JPA and Hibernate, how it work. Hibernate provide the implementation for JPA. My questions, Can we work alone with Spring data to persist data in mysql or we need some provider like hibernate or toplink etc for midsize application
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
The structure is as follows:
Spring Data JPA
|
JPA
|
Hibernate
You need Hibernate as an JPA implementation, but from your perspective you should only see Spring Data JPA.
When designing your entities if you make sure that you use only annotations from the javax.persistence
package you will not depend on one concrete JPA implementation (in this case Hibernate) but theoretically you could swap Hibernate for EclipseLink or something else.