0
点赞
收藏
分享

微信扫一扫

IntelliJ IDEA使用spring Initializr快速构建SpringBoot项目


文章目录

  • ​​步骤​​
  • ​​1、New->Project​​
  • ​​2、进入选择Spring Boot版本和依赖管理的窗口。​​
  • ​​3、项目目录结构​​

步骤

1、New->Project

选择spring Initializr,如下图

IntelliJ IDEA使用spring Initializr快速构建SpringBoot项目_java


点击Next

IntelliJ IDEA使用spring Initializr快速构建SpringBoot项目_spring boot_02


点击Next

2、进入选择Spring Boot版本和依赖管理的窗口。

IntelliJ IDEA使用spring Initializr快速构建SpringBoot项目_java_03

这里我选择web,Next

IntelliJ IDEA使用spring Initializr快速构建SpringBoot项目_Initializr_04


IntelliJ IDEA使用spring Initializr快速构建SpringBoot项目_Initializr_05

3、项目目录结构

IntelliJ IDEA使用spring Initializr快速构建SpringBoot项目_maven_06


自动生成的pom.xml如下所示:

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.4.4</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>com.ch</groupId>
<artifactId>ch3_3</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>ch3_3</name>
<description>Demo project for Spring Boot</description>
<properties>
<java.version>1.8</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>

</project>


举报

相关推荐

0 条评论