1.打开SpringBoot官方链接,选择你需要的SpringBoot的版本和jdk版本,填写项目名称,依赖选择SpringWeb
2.信息填写完毕后,点击生成按钮,自动下载SpringBoot快速启动程序 ,下载完成后,使用IntelliJ IDEA软件打开项目。在example目录下新建DemoApplication.java文件,补充以下代码
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
@SpringBootApplication
@RestController
public class DemoApplication {
publi