Search code examples
mysqlspring-bootspring-data-jpaspring-datareactive-programming

It's possible to integrate reactive Spring Data with mysql?


In the past, I integrated reactive spring data with mongoDb and everything gone fine. Now I want the same non blocking access using mysql, but i didnt find any article about it. I wish to use a mature and standard spring library, if you know one, please share it to me.


Solution

  • What you are looking for is R2DBC and Spring Data R2DBC.

    R2DBC is a reactive alternative to JDBC. And Spring Data R2DBC is a Spring Data module for it.

    Since R2DBC is only a specification/API you also need a driver for the database of your choice. For MySql that would be https://github.com/jasync-sql/jasync-sql