idea新建springboot项目

一、新建springboot项目

点击 文件--New--项目

 

 

 选择Spring Initializr

 

 

 下一步

 

 按照上面的或者直接下一步

 

 下一步

 

 点击完成

 

 

 二、启动项目

建立一个类

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class Test {

    @RequestMapping("/hello")
    public String helloSpringBoot() {
        return "Hello SpringBoot Project.";
    }
}

点击绿色箭头运行

 

 打开网页输入http://localhost:8080/hello

posted @ 2019-12-31 15:47  一如当初ゝ  阅读(137)  评论(0编辑  收藏  举报