使用mybatis的自动生成工具生成的主键id:

 

 

<selectKey resultType="java.lang.Integer" keyProperty="id" order="AFTER" >
SELECT LAST_INSERT_ID()
</selectKey>

使用sharding-jdbc时候 一直提示 分片报错, 可以使用这种方式解决:
<insert >
...
</insert>

相关文章:

  • 2021-11-18
  • 2021-07-22
  • 2022-12-23
  • 2021-06-22
  • 2020-12-25
  • 2021-06-03
  • 2021-11-24
猜你喜欢
  • 2023-04-10
  • 2022-12-23
  • 2021-08-06
  • 2022-12-23
  • 2022-12-23
  • 2022-02-12
  • 2022-12-23
相关资源
相似解决方案