UUIDUtil.java 521 Bytes
package com.dituhui.pea.util;

import java.util.UUID;

/**
 * uuid生成工具
 * @author guoping
 *
 */
public class UUIDUtil {

    public static String getUuid() {
        UUID uuid = UUID.randomUUID();
        String sud = uuid.toString();
        sud = sud.replaceAll("-", "");
        return sud;
    }

    public static String getUid(){
        return UUID.randomUUID().toString().replace("-", "").toLowerCase();
    }

    public static void main(String[] args) {
        System.out.println(getUuid());
    }

}