Spring FeignClient 遇到的参数问题(RequestParam.value() was empty on parameter 0)
2020-07-15 05:22
225 查看
先看下源码
@PostMapping(value = "url")
public Envelop create(@RequestParam String jsonData);
下面是启动报错日志
Caused by: java.lang.IllegalStateException: RequestParam.value() was empty on parameter 0
看提示很明显是参数问题,RequestParam注解的第一个参数是不能为空
简单粗暴的把RequestParam注解去掉,启动成功。再试试加上注解的描述
修改成:
@PostMapping(value = "url")
public Envelop create(@RequestParam(value = "jsonData", required = true) String jsonData);
这样启动成功,ok解决了。
相关文章推荐
- Spring FeignClient 遇到的参数问题(RequestParam.value() was empty on parameter 0)
- java.lang.IllegalStateException: RequestParam.value() was empty on parameter 0
- RequestParam.value() was empty on parameter 0
- Springboot中启动时报 Feign PathVariable annotation was empty on param 0.
- A potentially dangerous Request.Form value was detected from the client问题处理
- spring cloud feign 调用微服务转发不了request请求头和参数问题解决方案
- Attribute value request.getParameter("param") 问题
- SPRING IN ACTION 第4版笔记-第五章BUILDING SPRING WEB APPLICATIONS-004-以query parameters的形式给action传参数(@RequestParam、defaultValue)
- Feign PathVariable annotation was empty on param 0.异常解决
- 报错:Feign PathVariable annotation was empty on param 0.
- MVC 请求参数中带有HTML会引发Validation异常 ("A potentially dangerous Request.Form value was detected from the client")
- SpringMVC @RequestParam参数乱码的问题
- 搭建ssm框架遇到的问题:The request sent by the client was syntactically incorrect
- mybatis传入多个参数Lis(Map(String,Object))type handler was null on parameter mapping for property
- request.getParameter("参数") 乱码问题
- 出现错误‘A potentially dangerous Request.Form value was detected from the client’的解决方案
- ssm框架中遇到的问题二:org.springframework.web.util.NestedServletException: Request processing ...
- 使用SpringMVC注解@RequestParam(value="XXX",required=false)时需要注意的问题
- 解决报错:A potentially dangerous Request.Form value was detected from the client
- Spring MultipartFile 参数必须要带着@RequestParam