java - spring data jpa中的store是什么?

标签 java spring orm spring-data-jpa

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/

相关文章:

java - AWS Lambda Java,连接到MySQL RDS

java - Android在线程上保持套接字连接打开

java - Spring-boot中使用缓存抽象的缓存故障转移机制

entity-framework - 没有外键的数据库上的 Entity Framework

php - 从数据库表构建树类别

java - 我可以使用 springboot-javafx-support 从初级阶段获取根 Pane 吗?

java - 在java中使用正则表达式在数字之前获取字符串

CDI 实例的 Spring 等价物

java - Netflix Zuul - java.lang.ClassNotFoundException : rx. functions.Func1

javascript - 使用同一实例建立多对多关系