R2DBC
Spring Data R2DBC 模块将 Spring 核心概念应用于使用与 Domain-driven design principles对齐的 R2DBC 数据库驱动的解决方案的开发。我们提供 "`template`"作为存储和查询聚合的高级抽象。
The Spring Data R2DBC module applies core Spring concepts to the development of solutions that use R2DBC database drivers aligned with Domain-driven design principles. We provide a “template” as a high-level abstraction for storing and querying aggregates.
本文档是 Spring Data R2DBC 支持的参考指南。它解释了概念、语义和语法。
This document is the reference guide for Spring Data R2DBC support. It explains the concepts and semantics and syntax.
本章指出了 JDBC 存储库支持的特殊性。这是在 Working with Spring Data Repositories中解释的核心存储库支持的基础上构建的。你应该对那里解释的基本概念有深入的了解。
This chapter points out the specialties for repository support for JDBC. This builds on the core repository support explained in Working with Spring Data Repositories. You should have a sound understanding of the basic concepts explained there.
R2DBC 包含大量功能:
R2DBC contains a wide range of features:
-
Spring configuration support with Java-based
@Configuration
classes for an R2DBC driver instance. -
R2dbcEntityTemplate
as central class for entity-bound operations that increases productivity when performing common R2DBC operations with integrated object mapping between rows and POJOs. -
Feature-rich object mapping integrated with Spring’s Conversion Service.
-
Annotation-based mapping metadata that is extensible to support other metadata formats.
-
Automatic implementation of Repository interfaces, including support for custom query methods.
对于大多数任务,你应该使用 R2dbcEntityTemplate
或仓库支持,这两者都使用丰富的映射功能。R2dbcEntityTemplate
是查找诸如临时 CRUD 操作之类的访问功能的地方。
For most tasks, you should use R2dbcEntityTemplate
or the repository support, which both use the rich mapping functionality.
R2dbcEntityTemplate
is the place to look for accessing functionality such as ad-hoc CRUD operations.