spring boot 项目打包到maven仓库供其它模块使用

Posted 韩小鑫

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了spring boot 项目打包到maven仓库供其它模块使用相关的知识,希望对你有一定的参考价值。

在对spring boot项目进行打包发布的时候发现其它spring boot项目服务真正引用使用该spring boot包中的类

需对打包插件做如下修改:

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
</build>

spring boot 中默认为:
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>




















以上是关于spring boot 项目打包到maven仓库供其它模块使用的主要内容,如果未能解决你的问题,请参考以下文章

Spring Boot之输出hello

Spring Boot项目使用maven-assembly-plugin根据不同环境打包成tar.gz或者zip

docker与Spring boot的集成:docker-maven-plugin使用

Spring boot项目分环境Maven打包,动态配置文件,动态配置项目

Spring boot如何引入本地jar包?

Spring Boot(Maven)+Docker打包