fegin client使用http url合约时报: [Request processing failed; nested exception is feign.FeignException: status 400 reading

首先看feign client代码:
@FeignClient(name = "SPRING-CLOUD-WEB-PROVIDER-GROUP2", url = "http://localhost:8761/")
public interface SongFeignClientWithUrl {
/*@GetMapping("/call/{id}")
public Object getSongInfo(@PathVariable("id") int id);*/ @RequestMapping(value = "/eureka/apps/{serviceName}", method = RequestMethod.GET)
public Object findServiceInfoFromEurekaByServiceName(@RequestParam(value = "serviceName") String serviceName);
}
上面实际是从eureka中查询service的节点服务信息
如下是controller代码:
@GetMapping("/{serviceName}")
public Object findServiceInfoFromEurekaByServiceName(/*@PathVariable("serviceName")*/ String serviceName) { return songFeignClientWithUrl.findServiceInfoFromEurekaByServiceName(serviceName); }
问题就出在Controller入参String serviceName,注解被注释或者没有加@PathVariable注解,导致入参取不到值,feign client拿到的也是null,报的这个错。。。
当然,如果返回数据太大也会报400
fegin client使用http url合约时报: [Request processing failed; nested exception is feign.FeignException: status 400 reading的更多相关文章
- Spring Cloud ZooKeeper集成Feign的坑2,服务调用了一次后第二次调用就变成了500,错误:Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is com.n
错误如下: 2017-09-19 15:05:24.659 INFO 9986 --- [ main] s.c.a.AnnotationConfigApplicationContext : Refre ...
- HTTP Status 500 - Request processing failed; nested exception is org.springframework.jdbc.BadSqlGram
HTTP Status 500 - Request processing failed; nested exception is org.springframework.jdbc.BadSqlGram ...
- 报错 500 - Request processing failed; nested exception is com.alibaba.dubbo.rpc.RpcException的解决放案
版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明.本文链接:https://blog.csdn.net/loveliness_peri/artic ...
- Request processing failed; nested exception is org.springframework.dao.InvalidDataAccessApiUsageException: Multiple representations of the same entity解决方法
1.错误信息 Request processing failed; nested exception is org.springframework.dao.InvalidDataAccessApiUs ...
- HTTP Status 500 - Request processing failed; nested exception is org.hibernate.exception.GenericJDBCException: could not execute statement
1.什么操作出现:当我在项目中添加产品或者修改时,浏览器出现HTTP Status 500 - Request processing failed; nested exception is org.h ...
- 错误:严重: Servlet.service() for servlet [appServlet] in context with path [] threw exception [Request processing failed; nested exception is org.mybatis.spring.MyBatisSystemException: nested exception is
严重: Servlet.service() for servlet [appServlet] in context with path [] threw exception [Request proc ...
- [springMVC - 1A] - Request processing failed; nested exception is org.apache.ibatis.builder.IncompleteElementException
一月 14, 2016 1:30:07 下午 org.apache.catalina.core.StandardWrapperValve invoke严重: Servlet.service() for ...
- Request processing failed; nested exception is org.apache.ibatis.binding.BindingException: Invalid b
Request processing failed; nested exception is org.apache.ibatis.binding.BindingException: Invalid b ...
- org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.springframework.jdbc.BadSqlGrammarException: Unknown column 'viewpoint' in 'field list'
问题描述:当我在model中添加了一下代码以后数据库报错: 添加的代码为: private Viewpoint viewpoint; public Viewpoint getViewpoint() { ...
随机推荐
- samba服务器架设
#samba服务器架设方便线上linux服务器和windows服务器之间共享 1.关闭防火墙service iptables stop 2.关闭SELinuxsetenforce 0 3.安装samb ...
- SpringMVC返回JSON数据
1.导入json的jar包2.在Controller类中添加 //查看用户信息 ?json //params="json"的意思是访问view这个方法的时候,必须有一个参数json ...
- VS2010 由于缺少调试目标"xx.exe"
有两种可能会造成这种现像.A.配制属性出了问题. 一种方法:右击“解决方案”->“属性”,在弹出的“属性页”框中,选择左边的“配置属性”,在右边,将应用程序的生成那个框框勾上,二可能是这里的属性 ...
- (转)win7英文目录和中文目录,文件夹的别名
win7英文目录和中文目录,文件夹的别名 在使用win7的很多目录例如我的文档.我的音乐等目录,你会发现文件夹是中文名的,路径也是中文的.但这个不是真的路径.点击一下地址栏,就可以看到真实路径了. 这 ...
- java 实现在线阅读 .pdf
1.资源的本地地址 2.设置响应头 3.代码实现 @ResponseBody @RequestMapping(value = "/read") @ApiOperation(valu ...
- 转 JavaScript里的数组转化新方法Array.From
过去,我们使用各种各样的方法来将类似Array对象的东西(比如 arguments 和 NodeList) 转换成真的数值.比如下面这个: 将NodeList转换成数组 基本上,这些东西我们都可以使用 ...
- POJ_3069 Saruman's Army 【贪心】
一.题面 POJ3069 二.题意分析 我的理解是,可以在每个点设置一个监测点,能够监测到范围R内的所有其他点,那么问给出N个点的一维位置,需要在其中挑多少个监测点把所有点都监测到. 贪心解决: 1. ...
- 精神AC合集 2018.4.3
UESTC炸了,先把看似十分OK(只是过了样例)的代码贴上,修复好后再交上去 594 #include<iostream> #include<algorithm> #inclu ...
- 文件对象FSO应用 文件对象FSO应用
FileSystemObject对象被用来访问服务器上的文件系统.这个对象能够处理文件.文件夹和目录路径.用它来检索文件系统信息也是可能的. 下面的代码创建了一个文本文件,并写入了一些文本: dim ...
- js去掉浏览器右键点击默认事件(+vue项目开启右键行为)
js去掉浏览器右键点击默认事件 1.阻止整个页面所有的右击事件 document.oncontextmenu = function(){ return false;} 2.特定的区域/元素 docum ...