java.lang.NoClassDefFoundError: when trying to run jar

前端 未结 2 2011
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-01-11 18:51

I have a spring boot project using gradle

apply plugin: \'java\'
apply plugin: \'idea\'
apply plugin: \'jetty\'
apply plugin: \'war\'
apply plugin: \'org.spr         


        
2条回答
  •  走了就别回头了
    2021-01-11 19:52

    This is because your dependencies are not included into the end jar file.

    Take a look on the examples here or here.

    Or alternatively use ./gradlew clean build that should automatically pack the app correctly. Take a look on the official guide

提交回复
热议问题