#yyds干货盘点#Reactive访问Spring Data R2DBC

Posted zhz小白

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了#yyds干货盘点#Reactive访问Spring Data R2DBC相关的知识,希望对你有一定的参考价值。

1、Spring Data R2DBC

⼀些主要的类

  • ConnectionFactory
  • DatabaseClient
  • execute().sql(SQL)
  • inTransaction(db -> )
  • R2dbcExceptionTranslator
  • SqlErrorCodeR2dbcExceptionTranslator

1.1、pom

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.1.3.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>com.zhz</groupId>
<artifactId>reactive-spring-boot-r2dbc-demo</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>reactive-spring-boot-r2dbc-demo</name>
<description>Spring Boot使用reactive集成r2dbc</description>
<properties>
<java.version>1.8</java.version>
</properties>
<dependencies>
<!-- R2DBC依赖 -->
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-r2dbc</artifactId>
<version>1.0.0.M1</version>
</dependency>

<!-- https://mvnrepository.com/artifact/io.r2dbc/r2dbc-h2 -->
<dependency>
<groupId>io.r2dbc</groupId>
<artifactId>r2dbc-h2</artifactId>
<version>1.0.0.M6</version>
</dependency>

<!-- R2DBC依赖 -->

<dependency>
<groupId>org.joda</groupId>
<artifactId>joda-money</artifactId>
<version>1.0.1</version>
</dependency>

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>

<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework.#yyds干货盘点#Reactive访问Spring Data R2DBC

#yyds干货盘点#Vue3的reactive

Springboot自动装配详解#yyds干货盘点#

PyTorch教程 参数访问#yyds干货盘点#

#yyds干货盘点# springboot整合JPA访问Mysql

Windows 11 开启外网访问mysql之 防火墙设置 #yyds干货盘点#