1.New Project
2.项目目录、命名、配置
项目创建时需要下载的,如果觉得下载速度慢,创建项目时可以改一下Server URL地址,可以改成阿里云的脚手架:https://start.aliyun.com/,当然如果想改回来默认的别忘了地址:https://start.spring.io/
3.添加依赖,设置SpringBoot版本(记得联网)
4.创建后,会看见依赖、文件、框架等等的下载
5.编写一个简单的Web,检测一下框架
package com.example.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
public class HelloController {
@RequestMapping("/test")
public String hello(){
System.out.println("Hello SpringBoot~");
return "Hello SpringBoot~";
}
}
框架搭建完成