idea中搭建springboot学习(1) ---hello springboot项目

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/Gr_lbxx/article/details/83117209

new-project

点击finish即可

新建TestController类

package com.example.demo.demo1017;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class TestController {

    @RequestMapping("/hello")
    @ResponseBody
    public String hello(){
        return "hello springboot!";
    }

}

 点击DemoApplication运行项目即可

扫描二维码关注公众号,回复: 3666903 查看本文章

猜你喜欢

转载自blog.csdn.net/Gr_lbxx/article/details/83117209