Replication is used to synchronize the changes due to transactional queries with the slaves in the cluster.
数据库复制被用来把事务性查询导致的变更同步到集群中的从数据库。
The basic concept is to have a master database handle transactional queries while slaves handle SELECT queries.
基本的原理是让主数据库处理事务性查询,而从数据库处理SELECT查询。
Mark them @Transactional(readOnly=false) such that the SQL queries are executed under read/write database transactions.
将其标记为 @Transactional(readOnly=false),这样可以在读/写数据库事务下执行 SQL 查询。
应用推荐