springboot用UUID主键策略的问题

DEPRECATED : use [org.hibernate.id.UUIDGenerator] instead with custom [org.hibernate.id.UUIDGenerationStrategy] implementation

springboot2.2.6,某个实体使用uuid生成主键策略,提示这个,搜索了大量文章,都没人提过这个应该如何解决。。。

实体注解用的是这2个:

 @GenericGenerator(name = "uuid2", strategy = "uuid2" )
@GenericGenerator(name = "uuid2", strategy = "org.hibernate.id.UUIDGenerator" )

有大神知道怎么处理吗?

阅读 2.5k
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题