使用Gradle和Maven运行Spring Boot应用程序
原文英文,约200词,阅读约需1分钟。发表于: 。You can either run a Spring Boot application or build a jar from it. You can do both with either Gradle or Maven Gradle The command for running a Spring Boot app with Gradle...
使用Gradle或Maven可以运行Spring Boot应用或构建jar文件。Gradle命令:`./gradlew bootRun`运行应用,`./gradlew build`构建jar。Maven命令:`./mvnw spring-boot:run`运行应用,`./mvnw clean package`构建jar。运行jar命令:`java -jar build/libs/<jar_filename>.jar`。Gradle构建的jar在`/build/libs/`,Maven在`/target`。运行jar更快。