运行环境:
idea、jdk8、
依赖版本springboot-2.3.0、ShardingSphere-JDBC5.1.2、mybatis-spring-boot-starter-2.1.4、tk.mybatis-2.1.5
项目大体分俩块数据存储,任务主表以及任务明细表,其中任务明细是做了分表处理,主表并没有进行分表策略处理,
但是主表进行insert的时候(新增是使用tk框架封装好的insert方法),还是存在路由错误的问题,试过很多次SELECT LAST_INSERT_ID()都是会从不同数据源去获取,结果始终导致获取新增id为0
【ps:另外吐槽一下ShardingSphere的依赖包实在是太多了,满满的一沓页】
当前位置:网站首页>ShardingSphere-JDBC5.1.2版本关于SELECT LAST_INSERT_ID()本人发现还是存在路由问题
ShardingSphere-JDBC5.1.2版本关于SELECT LAST_INSERT_ID()本人发现还是存在路由问题
2022-07-02 18:40:00 【圆我梦】
采纳答案1:
都分库分表了,还是用雪花算法生成唯一ID吧
边栏推荐
- 第七章-类基础
- NPOI导出Excel2007
- AcWing 1126. 最小花费 题解(最短路—dijkstra)
- Yunna | why use the fixed asset management system and how to enable it
- AcWing 181. 回转游戏 题解(搜索—IDA*搜索)
- Horizontal ultra vires and vertical ultra vires [easy to understand]
- Watchful pioneer world outlook Architecture - (how does a good game come from)
- GMapping代码解析[通俗易懂]
- mybatiesHelperPro工具必须的可以生成到对应项目文件夹下
- The mybatieshelperpro tool can be generated to the corresponding project folder if necessary
猜你喜欢

Web2.0的巨头纷纷布局VC,Tiger DAO VC或成抵达Web3捷径

Windows2008r2 installing php7.4.30 requires localsystem to start the application pool, otherwise 500 error fastcgi process exits unexpectedly

End to end object detection with transformers (Detr) paper reading and understanding

搭建哨兵模式reids、redis从节点脱离哨兵集群

Why should we build an enterprise fixed asset management system and how can enterprises strengthen fixed asset management

Advanced performance test series "24. Execute SQL script through JDBC"

线程应用实例

守望先锋世界观架构 ——(一款好的游戏是怎么来的)

Watchful pioneer world outlook Architecture - (how does a good game come from)

机器学习笔记 - 时间序列预测研究:法国香槟的月销量
随机推荐
Pytorch版本、CUDA版本与显卡驱动版本的对应关系
AcWing 343. 排序 题解(floyd性质实现传递闭包)
《MongoDB入门教程》第03篇 MongoDB基本概念
Introduction of Ethernet PHY layer chip lan8720a
AcWing 1126. 最小花费 题解(最短路—dijkstra)
Digital scroll strip animation
Chapter 7 - class foundation
AcWing 1134. Shortest circuit counting problem solution (shortest circuit)
电脑使用哪个录制视频软件比较好
MySQL table historical data cleaning summary
Why should we build an enterprise fixed asset management system and how can enterprises strengthen fixed asset management
AcWing 1137. Select the best line solution (the shortest circuit)
Getting started with typescript
Watchful pioneer world outlook Architecture - (how does a good game come from)
Memory management of C
JS如何取整数
《重构:改善既有代码的设计》读书笔记(下)
搭建主从模式集群redis
AcWing 1125. Cattle travel problem solution (shortest path, diameter)
MySQL高级(进阶)SQL语句
