Spring MVC org.springframework.web.bind.MissingServletRequestParameterException解决办法

最近用postman请求后端输入参数中有sourceType,请求之后返回

org.springframework.web.bind.MissingServletRequestParameterException:Required String parameter 'sourceType' is not present

最后查看了下 是我的请求地址中需要加入sourceType

之前错误的请求地址是:http://dev.testexplame.com/API/api/marketing/promotion/191b61d70de04c80b399e3f01f18ccc4/batch

加入参数之后的地址是:http://dev.testexplame.com/API/api/marketing/promotion/191b61d70de04c80b399e3f01f18ccc4/batch?userPromotionId=191b61d70de04c80b399e3f01f18ccc4&sourceType=COMMUNITY_INVITE&sourceDetail=100002

修正后再请求就没有这个找不到参数的问题。

猜你喜欢

转载自blog.csdn.net/harryptter/article/details/80325414
今日推荐