mirror of
https://gitee.com/yudaocode/SpringBoot-Labs.git
synced 2026-09-03 05:53:54 +08:00
增加分库分表示例
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
* [《芋道 Spring Boot Elasticsearch 入门》](http://www.iocoder.cn/Spring-Boot/Elasticsearch/?github) 对应 [lab-15](https://github.com/YunaiV/SpringBoot-Labs/tree/master/lab-15) 。
|
||||
* [《芋道 Spring Boot MongoDB 入门》](http://www.iocoder.cn/Spring-Boot/MongoDB/?github) 对应 [lab-16](https://github.com/YunaiV/SpringBoot-Labs/tree/master/lab-16) 。
|
||||
* [《芋道 Spring Boot 多数据源(读写分离)入门》](http://www.iocoder.cn/Spring-Boot/dynamic-datasource/?github) 对应 [lab-17](https://github.com/YunaiV/SpringBoot-Labs/tree/master/lab-17) 。
|
||||
* [《芋道 Spring Boot 分库分表入门》](http://www.iocoder.cn/Spring-Boot/sharding-datasource/?github) 对应 [lab-18](https://github.com/YunaiV/SpringBoot-Labs/tree/master/lab-18) 。
|
||||
|
||||
# 安全控制
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ public class OrderMapperTest {
|
||||
|
||||
@Test
|
||||
public void testSelectById() { // 测试从库的负载均衡
|
||||
for (int i = 0; i < 10; i++) {
|
||||
for (int i = 0; i < 2; i++) {
|
||||
OrderDO order = orderMapper.selectById(1);
|
||||
System.out.println(order);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user