更新时间:2022-04-26 04:44:59
为 Spring Boot 文档中的命令行参数进行了描述,将其传递给bootRun
任务为:
As Command-Line Arguments in Spring Boot document describes, pass it for bootRun
task as:
-Pargs=<arg1>,<arg2>
和build.gradle
:
bootRun {
if (project.hasProperty('args')) {
args project.args.split(',')
}
}