Create a single executable JAR from a Spring Based Java Application

前端 未结 4 1340
攒了一身酷
攒了一身酷 2020-12-30 10:22

I have a spring based application that does a component/package scan looking for packages within a certain namespace. The application runs perfectly in Eclipse and I\'d like

4条回答
  •  说谎
    说谎 (楼主)
    2020-12-30 10:55

    You can use your option 1 Maven Compile to a single jar with additional goal parameters.

    mvn clean package spring-boot:repackage
    

    It will create the standalone jar file with Spring autoload functionality.

提交回复
热议问题