Create a multi-module Spring Boot project based on Maven

When creating a Spring Boot project using Spring Boot's initializer, etc., you need to specify that the parent project of the project is spring-boot-starter-parent in pom.xml.

	<parent>
		<groupId>org.springframework.boot</groupId>
		<artifactId>spring-boot-starter-parent</artifactId>
		<version>3.0.6</version>
		<relativePath/> <!-- lookup parent from repository -->
	</parent>

If you want to create a multi-module project, each module is a separate Spring Boot project, how to deal with it?
In a multi-module project in Maven, a parent project of pom type needs to be created, and each module needs to specify the parent as this, so how to configure Spring Boot for each module?

This article uses Spring Tools Suite (Spring officially provides Eclipse with Spring Boot development plug-ins) to create a multi-module Spring Boot project.

Create steps

First create a parent project

  1. Click the "File" menu, select New > Maven Project

insert image description here

  1. Create a simple project

Guess you like

Origin blog.csdn.net/oscar999/article/details/130632159