Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Spring boot reactive (Webflux) with MySql

I would develop an Spring boot application compliant with new feature Webflux. Does an driver JDBC for Mysql exist?

I found just driver for some NoSql DB (for ex. MongoDB).

Could you help me? Thanks, regards.

UPDATE:

On official site of R2DBC project there is the drivers list: https://r2dbc.io/

like image 831
Michel Foucault Avatar asked Nov 08 '18 13:11

Michel Foucault


People also ask

Can we configure MySQL with spring boot?

Spring Boot has support for MySQL and other popular relational databases.In this post, we will focus on configuring Spring Boot for MySQL database.

Is spring WebFlux better than spring MVC?

Moreover, Spring WebFlux supports reactive backpressure, so we have more control over how we should react to fast producers than both Spring MVC Async and Spring MVC. Spring Flux also has a tangible shift towards functional coding style and declarative API decomposition thanks to Reactor API behind it.

What is reactive with spring WebFlux?

Reactive programming is driven by events and focuses on the flow of data in a non-blocking, asynchronous way. Reactive programming is the foundation of Spring WebFlux, an alternative way of developing web applications. Spring WebFlux makes it possible to build reactive applications on the HTTP layer.


2 Answers

Actually there isn't any reactive support for relational database. But not for long time since the Spring Data team is working on R2DBC, which will provide the ability to access data reactively from a relational database. Stay tuned here: https://github.com/r2dbc

EDIT

The first release is out, see here for more details: https://github.com/r2dbc/r2dbc-postgresql/tags

like image 199
akuma8 Avatar answered Sep 21 '22 02:09

akuma8


An asynchronous driver for MySQL exists and it's called jasync-sql:

https://github.com/jasync-sql/jasync-sql

like image 43
Marco Avatar answered Sep 20 '22 02:09

Marco