package com.taotao.utils;
import java.util.Random;
public class IDUtils {
/**
* 图片名生成
*/
public static String genImageName() {
//取当前时间的长整形值包含毫秒
long millis = System.currentTimeMillis();
//long millis = System.nanoTime();
//加上三位随机数
Random random = new Random();
int end3 = random.nextInt(999
java 工具类-生成主键
最新推荐文章于 2024-02-21 23:51:40 发布
本文详细介绍了在Java开发中如何创建一个工具类来生成主键,包括常见方法和最佳实践,帮助开发者更好地管理数据库主键。
摘要由CSDN通过智能技术生成