Skip to content

Instantly share code, notes, and snippets.

@vector4wang
Last active June 18, 2019 01:08
Show Gist options
  • Save vector4wang/ebef1805ea6f9c62cee028fd749d986a to your computer and use it in GitHub Desktop.
Save vector4wang/ebef1805ea6f9c62cee028fd749d986a to your computer and use it in GitHub Desktop.
[多模块项目不引入springboot paremt] 解决maven项目的父项目中引入springboot的parent而出现的问题 #Java #Springboot #Maven
<!-- https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#using-boot-maven-without-a-parent -->
<dependencyManagement>
<dependencies>
<dependency>
<!-- Import dependency management from Spring Boot -->
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>2.1.5.RELEASE</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<!-- 子模块打包添加如下配置 -->
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<mainClass>com.lbd.data.export.Application</mainClass>
</configuration>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment