import java.util.UUID; 2017-09-06 本文已影响0人 Explorer_Mi String uuid = UUID.randomUUID().toString(); 说明 uuid:产生随机字符串作为主键,主键类型必须为String类型。