gradle打包springboot項目無法使用java -jar xxx.war 啓動

解決方案:

build.gradle中使用

plugins {
 id "org.springframework.boot" version "2.1.5.RELEASE"
}

或是

buildscript {
    repositories {
        mavenCentral()
    }
    dependencies {
        classpath "org.springframework.boot:spring-boot-gradle-plugin:2.1.5.RELEASE"
    }
}
apply plugin: "org.springframework.boot"

 然後打包命令使用:gradle build

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章