Running environment :
idea、jdk8、
Dependent version springboot-2.3.0、ShardingSphere-JDBC5.1.2、mybatis-spring-boot-starter-2.1.4、tk.mybatis-2.1.5
The project is roughly divided into two pieces of data storage , Task main table and task details , The task details are divided into tables , The main table is not processed by the table splitting strategy ,
But the main table insert When ( Add is to use tk The frame is encapsulated insert Method ), There is still the problem of routing errors , Tried many times SELECT LAST_INSERT_ID() Will be obtained from different data sources , The result is always to get new id by 0
【ps: And make complaints about it ShardingSphere There are too many dependent packages , A stack of pages full 】
当前位置:网站首页>Shardingsphere jdbc5.1.2 about select last_ INSERT_ ID () I found that there was still a routing problem
Shardingsphere jdbc5.1.2 about select last_ INSERT_ ID () I found that there was still a routing problem
2022-07-02 19:41:00 【Fulfill my dream】
Take the answer 1:
It's all divided into databases and tables , Or use the snowflake algorithm to generate unique ID Well
边栏推荐
- Is there any security guarantee for the ranking of stock and securities companies
- AcWing 1125. Cattle travel problem solution (shortest path, diameter)
- Web2.0 giants have deployed VC, and tiger Dao VC may become a shortcut to Web3
- AcWing 1129. 热浪 题解(最短路—spfa)
- 自动生成VGG图像注释文件
- Kt148a voice chip IC user end self replacement voice method, upper computer
- AcWing 1128. 信使 题解(最短路—Floyd)
- AcWing 1125. 牛的旅行 题解(最短路、直径)
- 中缀表达式转换为后缀表达式(C语言代码+详解)
- Idea editor removes SQL statement background color SQL statement warning no data sources are configured to run this SQL And SQL dialect is not config
猜你喜欢
Chic Lang: completely solve the problem of markdown pictures - no need to upload pictures - no need to network - there is no lack of pictures forwarded to others
《重构:改善既有代码的设计》读书笔记(下)
AcWing 1126. 最小花费 题解(最短路—dijkstra)
Build a master-slave mode cluster redis
《架构整洁之道》读书笔记(下)
Dictionaries
Set up sentinel mode. Reids and redis leave the sentinel cluster from the node
AcWing 342. 道路与航线 题解 (最短路、拓扑排序)
Py's interpret: a detailed introduction to interpret, installation, and case application
Bubble sort array
随机推荐
Embedded (PLD) series, epf10k50rc240-3n programmable logic device
AcWing 1131. 拯救大兵瑞恩 题解(最短路)
思考变量引起的巨大变化
MySQL表历史数据清理总结
R语言使用econocharts包创建微观经济或宏观经济图、indifference函数可视化无差异曲线(indifference curve)
451 implementation of memcpy, memmove and memset
《架构整洁之道》读书笔记(下)
Registration opportunity of autowiredannotationbeanpostprocessor in XML development mode
Py's interpret: a detailed introduction to interpret, installation, and case application
Zabbix5 client installation and configuration
Solution: vs2017 cannot open the source file stdio h main. H header document [easy to understand]
Bubble sort array
PXE installation "recommended collection"
Quanzhi A33 uses mainline u-boot
Detailed tutorial on installing stand-alone redis
AcWing 383. 观光 题解(最短路)
AcWing 181. 回转游戏 题解(搜索—IDA*搜索)
编写完10万行代码,我发了篇长文吐槽Rust
Horizontal ultra vires and vertical ultra vires [easy to understand]
《代碼整潔之道》讀書筆記