SpringBoot多模块相互依赖,找不到依赖包

阅读更多
https://blog.csdn.net/guduyishuai/article/details/60968728
https://docs.spring.io/spring-boot/docs/1.5.9.RELEASE/reference/html/howto-build.html
84.4 Create an executable JAR with Maven

原因就是默认打包出来的可执行jar和war一样是不可依赖的。
需要加分类器创建一个可执行jar(包含各种依赖)
同时会创建一个只包含当前项目字节码的jar(用于依赖,不包含其他依赖)

        xxx-api-xxxapp
       
           
                org.springframework.boot
                spring-boot-maven-plugin
               
                    api.xxx.com.xxxAPIApplication
                    exec
               

               
                   
                       
                            repackage
                       

                   

               

           

           
                maven-resources-plugin
                2.5
           

       

   

你可能感兴趣的:(找不到依赖包)