Spring boot application won't run when trying to run from the jar file

前端 未结 3 1826
别跟我提以往
别跟我提以往 2020-12-11 17:13

I have a spring boot application which works fine when run through intellij. But when I run it from the jar I am getting the below exception.

        2017-02         


        
3条回答
  •  感情败类
    2020-12-11 17:50

    You have spring-boot-starter-jersey in your pom.xml. The error you are getting is /BOOT-INF/classes (No such file or directory). This is the issue with jersey which doesn't work well with spring-boot fat jar. Please refer this and this for more details. For work around you have to package the classes that should be scanned by jersey in a jar and extract the jar as given at Spring-Boot documentation Extract specific libraries when an executable jar runs

提交回复
热议问题