0
点赞
收藏
分享

微信扫一扫

IDEA搭建springboot项目


前言

今天使用idea来搭建一个springboot项目,首先我使用的maven版本为3.6.0,idea版本为2018.2,jdk版本为1.8

操作

1、点击新建

IDEA搭建springboot项目_maven

2、选择Spring Initializr,选择jdk1.8

IDEA搭建springboot项目_maven_02

3、起一个自己的项目名称

IDEA搭建springboot项目_spring boot_03

4、选择web里的Spring Web,后续如果需要mybatis的话,直接在pom.xml

里面添加即可

IDEA搭建springboot项目_程序人生_04

5、点击finish即可

IDEA搭建springboot项目_程序人生_05

6、pom.xml中加入这些配置

<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.4.0</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<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>

7、运行结果

IDEA搭建springboot项目_经验分享_06

9、出现上述情况证明项目搭建成功。



举报

相关推荐

0 条评论