【发布时间】:2018-04-21 16:48:35
【问题描述】:
我在 build.gradle 中有以下片段。
buildscript {
ext {
springBootVersion = '1.5.12.RELEASE'
}
repositories {
mavenCentral()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
}
}
..
bootRun {
systemProperties = System.properties
}
..
我使用以下命令运行应用程序。
./gradlew bootRun -PjvmArgs=-Dserver.port=8090
但是它不起作用。我应该改变什么来运行具有指定端口的应用程序,就像我在 application.properties 中所做的那样。
server.port=8090
【问题讨论】:
标签: java spring-boot gradle build.gradle