How to use single datasource for reading and writing in Springboot with mysql-innodb-cluster

300 views Asked by At

I am using Innodb-cluster with three instances with "Single-Primary" topology. Now when I configure MysqlRouter it gives me following two ports for reading and writing:

- Read/Write Connections: localhost:6446
- Read/Only Connections: localhost:6447

However in my Spring boot application I do not want to keep read and write separation, because it forces me to keep two datasources.

Is there any way that I can just use one connection/datasource for both reading and writing?

0

There are 0 answers