First of all, the error is most likely caused by the incorrect way the request was made. SpringBoot has three common request methods: @requestmapping, @getmapping, and @postmapping.
**
**
- @RequestMapping: This is a general annotation that does not specify a request, so it can accept a series of requests such as POST, GET, PUT, HEAD, etc. @GetMapping: This is the request for GET, the browser default request for this type of request, is short for @RequestMapping(method= requestMethod.get) @PostMapping: This is the request for POST, which is short for @RequestMapping(method= RequestMethod.post)
* *
again turn head to see this error, literally does not support a get request, see your own annotations to project, it was the wrong
I am a visit by enter the URL address bar, the default is the get method, the annotation to @ RequestMapping is ok, the error is solved.