生成随机字符串
1.使用uuid生成随机字符串
1 package com.test.springboot.utils; 2 3 import java.util.UUID; 4 5 public class Test { 6 public static void main(String[] args) { 7 String random= UUID.randomUUID().toString().replaceAll("-", "").substring(0, 10); 8 } 9 }
执行示例:

http://linuxcoming.com/blog/2019/08/22/java_random_string_generator.html
浙公网安备 33010602011771号