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.
Read More:
- Solve the problem that the delete request is not available under SpringBoot. There was an unexpected error (type=Method Not Allowed, status=405).
- When feign is called, the solution of request method ‘post’ not supported appears
- The problem that headers [‘content-type ‘] does not work is set in the Axios get method request interface
- Springcloud Feign Upload MultipartFile Error: Current req is not a multipart request Content type not supported
- In the HTML page request Ajax times 400 error, solve Yii submit post form 400 error, and Ajax post request 400 problem (example code)
- Solve the problem that power view in Excel prompts activate method of oleobject class failed or activate method like oleobject is invalid
- Solution to the problem of keyword not supported data source
- Solve the problem of “error msb6006: link.exe Exited, bad method with code 2
- TypeError: Failed to execute ‘fetch‘ on ‘Window‘: Request with GET/HEAD method cannot have body.
- ArcGIS Earth 1.7 beta installation method-solve the 0X80070057.DirectX device creation failed problem
- To solve the problem that deep in 20.2 system cannot save and transform the format of typora, and provide an effective installation method of typora
- Solve the problem that springboot does not scan @ repository
- request:fail url not in domain list or Cannot send network request to localhost
- “Method does not override method from its superclass”
- Arduino reports an error when writing a custom library file to solve the problem of not name of type, not declared in this scope
- Solve the problem of flag error valueerror: View function did not return a response
- Solve the problem of MySQL 1251 client does not support
- Flask Request an extension before_request after_request errorhandler
- IIS “Bad Request – Request Too Long. HTTP Error 400. The size of the request headers is too long.”
- How to solve the problem of error 15: file not found when Linux starts