图文创建一个springboot Demo(IDEA创建)

 File -> New -> Project

 由于是快速入手 就不写具体代表什么了 直接下一步

我喜欢添加的。。。。 仅供参考 你可以直接下一步

完成

shift+ctrl+alt+s 修改如下

package com.example.demo;

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

@RestController
public class SpringBootTest {
    @RequestMapping("hello")
    public String day(){
        return "hello";
    }
}

控制台

在浏览器   http://localhost:8080/hello

发布了76 篇原创文章 · 获赞 41 · 访问量 4万+

猜你喜欢

转载自blog.csdn.net/edtwar/article/details/90230834