Use spring boot - maven build
1. inherited starter parent
<parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>2.1.8.RELEASE</version> </parent>
2. If your system has parent pom custom, want to use springboot. Also may be added directly dependent on the following:
<dependencyManagement> <dependencies> <!-- 这儿写其他依赖 --> <dependency> <!-- Import dependency management from Spring Boot --> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-dependencies</artifactId> <version>2.1.8.RELEASE</version> <type>pom</type> <scope>import</scope> </dependency> </dependencies> </dependencyManagement>
3. Spring Boot contain a Maven plugin, items can be packaged as an executable jar. You need to add the following <plugin> in the pom
<build> <plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> </plugin> </plugins> </build>
4.springboot provides a variety of Starters , just add the corresponding dependencies to use.