UUID生成字符串时间:2023-03-09 18:09:59 在向数据库插入新数据时,可能需要插入字符串形式的ID,这时使用UUID可以生成随机字符串: String str = UUID.randomUUID().toString();