一、打开网站
二、设置选项
选择完成后点击生成按钮,会得到一个压缩包,选择解压。
三、使用IDEA导入解压文件
删除不必要的东西,得到如下:
四、简单测试
4.1、在MassimoApplication同级目录下新建包controller
4.2、在controller中创建类HelloController
package com.example.demo.controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
public class HelloController {
@RequestMapping("/hello")
public String hello(){
return "hello,World";
}
}