运行环境:
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吧
边栏推荐
猜你喜欢

数据湖(十二):Spark3.1.2与Iceberg0.12.1整合

Zabbix5 client installation and configuration

线程应用实例

xml开发方式下AutowiredAnnotationBeanPostProcessor的注册时机

Web2.0 giants have deployed VC, and tiger Dao VC may become a shortcut to Web3

Build a master-slave mode cluster redis

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

Educational Codeforces Round 129 (Rated for Div. 2) 补题题解

注解开发方式下AutowiredAnnotationBeanPostProcessor的注册时机

AcWing 903. 昂贵的聘礼 题解(最短路—建图、dijkstra)
随机推荐
Build a master-slave mode cluster redis
定了,就是它!
字典
Juypter notebook modify the default open folder and default browser
SQLite 3.39.0 发布,支持右外连接和全外连接
According to the atlas of data security products and services issued by the China Academy of information technology, meichuang technology has achieved full coverage of four major sectors
AcWing 343. Sorting problem solution (Floyd property realizes transitive closure)
安装单机redis详细教程
Develop fixed asset management system, what voice is used to develop fixed asset management system
【pytorch学习笔记】Tensor
Windows2008R2 安装 PHP7.4.30 必须 LocalSystem 启动应用程序池 不然500错误 FastCGI 进程意外退出
Reading notes of "the way to clean structure" (Part 2)
Gamefi链游系统开发(NFT链游开发功能)丨NFT链游系统开发(Gamefi链游开发源码)
Codeworks 5 questions per day (1700 average) - day 4
Introduction to program ape (XII) -- data storage
虚拟机初始化脚本, 虚拟机相互免秘钥
Npoi export Excel2007
Implementation of 452 strcpy, strcat, StrCmp, strstr, strchr
搭建哨兵模式reids、redis从节点脱离哨兵集群
AcWing 1125. Cattle travel problem solution (shortest path, diameter)
