Springboot入门(一)

新建一个Springboot项目,使用IDEA开发。以下是新建一个Springboot项目的步骤。

1.
选择Spring Initializr,选择默认配置。

2.
填写组ID和个人ID

3.
勾选web模板

4.
填写项目名称选择项目存放位置

5.
新建的springboot项目结构

6.编写HelloController类作为访问入口
package com.example.springbootdemo;

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 springboot");
    }
}

7.
运行后访问界面

你可能感兴趣的:(Springboot入门(一))