Photo create a springboot Demo (IDEA creation)

 File -> New -> Project

 Because it is fast start is not what to write on behalf of a specific direct the next step

I like to add. . . . You can direct the next step is for reference only

carry out

shift + ctrl + alt + s is modified as follows

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

 

Console

In the browser    http: // localhost: 8080 / hello

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Published 76 original articles · won praise 41 · views 40000 +

Guess you like

Origin blog.csdn.net/edtwar/article/details/90230834