使用idea快速创建一个springboot的小demo(自动添加依赖)
程序员文章站
2022-07-07 13:58:34
...
1.file->project->Spring Lnitializr ->
写一个controller
package com.yuanting.springbootquick.controller;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
@Controller
public class QuickController {
@ResponseBody
@RequestMapping("quick")
public String quickSpringboot(){
return "quick Spirngboot";
}
}
运行项目
测试:http://localhost:8080/quick
上一篇: 闲置小U盘能做什么?