在Spring Data JPA
文档中,他们经常提到store
这个词。文档中的这样一行是:
If you use the repository abstraction for any other store, you need to change this to the appropriate namespace declaration of your store module. In other words, you should exchange jpa in favor of, for example, mongodb.
store
的实际含义是什么?
jpa
是否仅代表 store
上下文中的关系数据库?
类似地,我们可以有基于 store
的注释,例如 @EnableJpaRepositories
和 @EnableMongoRepositories
。为什么我们有单独的注释?我将不胜感激。
最佳答案
“存储”是您“存储”(保存)数据的位置。
这是一个更通用的术语,涵盖数据库和非数据库。
通常也称为“数据存储”,例如请参阅Wikipedia :
<小时/>A data store is a repository for persistently storing and managing collections of data which include not just repositories like databases, but also simpler store types such as simple files, emails etc.
JPA 表示 Java Persistence API,例如请参阅Wikipedia :
<小时/>The Java Persistence API (JPA) is a Java application programming interface specification that describes the management of relational data in applications using Java Platform, Standard Edition and Java Platform, Enterprise Edition.
如果你看Spring Data站点,您会发现它支持许多不同的数据访问技术:
- Spring Data JDBC
- Spring Data JDBC 扩展
- Spring Data JPA
- Spring 数据 LDAP
- Spring Data MongoDB
- Spring Data Redis
- Spring 数据 REST
- 适用于 Apache Cassandra 的 Spring Data
- 适用于 Apache Geode 的 Spring 数据
- 适用于 Apache Solr 的 Spring Data
- Pivotal GemFire 的 Spring 数据
- Spring Data Couchbase
- Spring Data Elasticsearch
- Spring 数据恩格斯
- Spring Data Neo4J
- 适用于 Apache Hadoop 的 Spring
JDBC和JPA都可以用来访问关系数据库。
关于java - spring data jpa中的store是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53234903/