MissingServletRequestParameterException: Required String parameter 'xxx' is not present

我遇到这个问题的主要原因是在controller里面用的@RequestParam标签接收,但在postman里面写的是Body里面,如图 @RequestParam接收的是请求参数,不是接收请求头的body里面的参数的,所以这样写是接收不到的,如果要接收到这个参数需要用@RequestBody这个注解,,然后controller里面可以用map接收参数,如图 ,如果参数是一个列表的话可以用Lis
相关文章
相关标签/搜索