All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.hecloud.runtime.common.generator.KeyGenerator Maven / Gradle / Ivy

package com.hecloud.runtime.common.generator;

import java.util.UUID;

/**
 * 主键生成器
 *
 * @author LoveinBJ
 */
public class KeyGenerator {

    /**
     * UUID生成器
     *
     * @return uuid
     */
    public static synchronized String uuid() {
        return UUID.randomUUID().toString().replace("-", "");
    }

    public static synchronized String mac() {
        return UUID.randomUUID().toString().toUpperCase();
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy