在配置文件中采用:
${random.int}
获取一个随机值。
SpringBoot——配置文件占位符
原文:https://www.cnblogs.com/yadongliang/p/11688887.html