博客园 首页 联系 订阅 管理

springmvc保存时候如果表的主键是字符类型则需要添加uuid

String uuid = UUID.randomUUID().toString().replace("-", "");

对象.setId(uuid);