常用注解

@RequestBody(required = false) 可以为空

用于读取 Request 请求(可能是 POST,PUT,DELETE,GET 请求)的 body 部分并且Content-Type 为 application/json 格式的数据,接收到数据之后会自动将数据绑定到 Java 对象上去。系统会使用HttpMessageConverter或者自定义的HttpMessageConverter将请求的 body 中的 json 字符串转换为 java 对象。

需要使用post方式提交

上一篇:org.springframework.web.client.restclientexception: no httpmessageconverter for java.util.hashmap an


下一篇:【Spring】No suitable HttpMessageConverter repsonse type