今天看了点R2DBC,官网:https://r2dbc.io/ Spring-Data-R2dbc:https://spring.io/projects/spring-data-r2dbc 学习文档:https
简介 上篇文章我们讲到了怎么在Spring webFlux中使用r2dbc,今天我们看一下怎么使用spring-data-r2dbc这个Spring data对r2dbc的封装来进行r2dbc操作。 groupId> <artifactId>spring-boot-starter-webflux</artifactId> </dependency> 数据库连接配置 Spring-data-r2dbc
当然也可以访问mongodb,以及部分关系型数据库,例如 Postgres,H2,Microsoft SQL Sever,目前只支持这些,持续更新请关注(https://spring.io/projects/spring-data-r2dbc
参考链接: Spring Data R2DBC: https://spring.io/projects/spring-data-r2dbc R2DBC: https://r2dbc.io
找到Clients https://r2dbc.io/clients/ 我们选择spring-data-r2dbc 即可 ---- 附: 反应式宣言 https://www.reactivemanifesto.org
dependency elements omitted --> <dependency> <groupId>org.springframework.data</groupId> <artifactId>spring-data-r2dbc
RELEASE" implementation "com.h2database:h2:1.4.200" implementation "org.springframework.data:spring-data-r2dbc
spring-data-mongodb")optional("org.springframework.data:spring-data-neo4j")optional("org.springframework.data:spring-data-r2dbc