wulm

在yml里面配置随机端口如下:

server:
port: ${random.int[10000,19999]}


如果在配置其他地方要使用该端口是可以使用占位符代替如下:
config: localhost:${server.port}


分类:

技术点:

相关文章: