美文网首页
Mybatis-Plus ID生成策略

Mybatis-Plus ID生成策略

作者: MaJiT | 来源:发表于2020-02-01 16:54 被阅读0次

实体类中,用@TableId注解来设置ID自动生成策略
ID类型为一下几种:

1.@TableId(type=IdType.AUTO)----数据库ID自增

2.@TableId(type=IdType.UUID()----字符串全局唯一ID

等等。。。

全局ID生成策略:

在spring boot application配置文件中添加


image.png

相关文章

网友评论

      本文标题:Mybatis-Plus ID生成策略

      本文链接:https://www.haomeiwen.com/subject/gwdxxhtx.html