一、通过idea工具搭建,如下:
新建Project和Module,选择Spring initializr,点击Next,进入到如下页面填写
填写完后点击Next 到如下页面,根据你的具体所需,选择要使用的技术依赖
点击Next
点击FInish,恭喜你创建完成。
二、通过官网工具生成,访问官网工具:https://start.spring.io/
选择好依赖技术后点击生成操作,相信你一看便知如果操作了哦
三、通过创建普通Maven工程的方式搭建
1、首先你创建一个普通maven工程
2、创建完成后在你的pom文件中导入如下依赖配置
4.0.0 org.springframework.boot spring-boot-starter-parent 2.5.4 com.liuyc liuyc-demo 0.0.1-SNAPSHOT 8 org.springframework.boot spring-boot-starter-web org.springframework.boot spring-boot-starter-test test org.springframework.boot spring-boot-maven-plugin
3、创建启动类
package com.liuyc;import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;@SpringBootApplication
public class LiuycDemoApplication {public static void main(String[] args) {SpringApplication.run(LiuycDemoApplication.class, args);}}
启动成功如下:
四、 已搭建好springboot-demo,有需要小伙伴请点击:https://download.csdn.net/download/u010197591/87527243
有问题欢迎留言,谢谢!