springboot 快速搭建

Springboot入门

1. 快速搭建

https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/ 官方文档

https://start.spring.io/ 搭建官网

下载 导入idea 即可

导入后的项目结构

创建controller 测试 helloController

@RestController
public class HelloController {

    @RequestMapping(value = "/hello")
    public String  helloSpringBoot(){
        return "hello springboot";
    }
}

启动主函数

#配置端口
server.port=8081

访问 http://localhost:8080/hello

posted @ 2021-01-23 17:21  immortal_mode  阅读(57)  评论(0)    收藏  举报