Spring Boot study notes

Understanding of Rest

PS: Because REST is not a specific technology or a specific specification, REST is actually a very rich architectural style.

PS: There is no direct connection between spring mvc and spring boot

1. Build the project

delete red file

Startup project

1. The first way to start

 

package com.bee.girl;

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

@RestController
public  class Hello Controller {

    @RequestMapping(value = "/hello",method = RequestMethod.GET)
    public String say(){
        return  "hello,springboot!!!";
    }
}

 

 2. The second way to start

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325303326&siteId=291194637