xiaoyong931011
2022-08-09 3284eb81a736c1cf3e78d92ecb690d47e5d7e7e6
1
2
3
4
5
6
7
8
9
10
11
package com.xcong.farmer.cms.modules.system.util;
 
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;
import java.util.UUID;
@Component public class UUIDUtil {
    /** * 生成32位的随机UUID * @return 字符形式的小写UUID */
    @Bean public String getUUID32() {
        return UUID.randomUUID().toString() .replace("-", "").toLowerCase();
    }
}