运行环境:
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吧
边栏推荐
- LeetCode 0871. Minimum refueling times - similar to poj2431 jungle adventure
- AcWing 1125. Cattle travel problem solution (shortest path, diameter)
- AcWing 1126. 最小花费 题解(最短路—dijkstra)
- [error record] problems related to the installation of the shuttle environment (follow-up error handling after executing the shuttle doctor command)
- Yunna | why use the fixed asset management system and how to enable it
- metric_ Logger urination
- Windows2008r2 installing php7.4.30 requires localsystem to start the application pool, otherwise 500 error fastcgi process exits unexpectedly
- Thread application instance
- Golang concurrent programming goroutine, channel, sync
- Data dimensionality reduction factor analysis
猜你喜欢
《重构:改善既有代码的设计》读书笔记(上)
xml开发方式下AutowiredAnnotationBeanPostProcessor的注册时机
450-深信服面经1
Educational Codeforces Round 129 (Rated for Div. 2) 补题题解
Zabbix5 client installation and configuration
Codeworks 5 questions per day (1700 average) - day 4
Py之interpret:interpret的简介、安装、案例应用之详细攻略
嵌入式(PLD) 系列,EPF10K50RC240-3N 可编程逻辑器件
Data dimensionality reduction principal component analysis
Windows2008r2 installing php7.4.30 requires localsystem to start the application pool, otherwise 500 error fastcgi process exits unexpectedly
随机推荐
4274. 后缀表达式-二叉表达式树
golang:[]byte转string
Virtual machine initialization script, virtual machine mutual secret key free
Golang:[]byte to string
Windows2008r2 installing php7.4.30 requires localsystem to start the application pool, otherwise 500 error fastcgi process exits unexpectedly
以太网PHY层芯片LAN8720A简介
Reading notes of code neatness
安装单机redis详细教程
Binary operation
End to end object detection with transformers (Detr) paper reading and understanding
Py之interpret:interpret的简介、安装、案例应用之详细攻略
MySQL table historical data cleaning summary
电脑使用哪个录制视频软件比较好
Golang concurrent programming goroutine, channel, sync
Data dimensionality reduction factor analysis
注解开发方式下AutowiredAnnotationBeanPostProcessor的注册时机
函数高阶-柯里化实现
简书自动阅读
Implementation of 453 ATOI function
AcWing 1127. 香甜的黄油 题解(最短路—spfa)