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() { ...
随机推荐
- mysql主从复制简单配置,满满的干货
mysql主从备份(复制)的基本原理 mysql支持单向.异步复制,复制过程中一个服务器充当主服务器,而一个或多个其它服务器充当从服务器.mysql复制基于主服务器在二进制日志中跟踪所有对数据库的更改 ...
- 关于使用self.title文字不居中的解决办法
最放发现,使用Segue在对视图切换,左上角的一般都是<Back 的一个Button控键或者是上一个视图的<title .因为上一个视图的title名字太长,导致当前视图的title被挤压 ...
- Mac的Parallels在启动Win的时候让它独立全屏窗口
这里备忘一下,由于经常需要***,Win方法比较多少,所以使用Parallels在Win下***还是很有必要的,为了使用使用方便,一般让Parallels启动系统之后自动生成一个独立的全窗口,方便来回 ...
- centos6.7安装tomcat
一.配置环境 安装环境: centos6.7 jdk1.8.0 tomcat8.5 1.到官网下载tomcat 二.下载安装tomcat 1.通过xsheel工具rz命令上传tomcat安装包 ...
- VS2013过期激活
然后点击"更改我的产品许可证",输入密钥 : BWG7X-J98B3-W34RT-33B3R-JVYW9 即可注册成功...
- springcloud整合bus
bus的使用主要是配合springcloud config部分来一起使用,并没有单独使用 首先建立服务端: <dependency> <groupId>org.springfr ...
- liunx 安装 phpstudy
phpStudy Linux版&Win版同步上线 支持Apache/Nginx/Tengine/Lighttpd/IIS7/8/6 phpStudy for Linux 支持Apache/Ng ...
- C++_类继承1-从一个简单的类开始
面向对象编程的主要目的之一是:提供可重用的代码.尤其是项目很庞大的时候,重用测试过的代码比重新编码代码要好得多. C++提供了更高层次的重用性.其中之一就是继承这个概念. 一些厂商提供了类库.类库由类 ...
- Python-匿名函数(lambda),map()
1. map() 描述 map() 会根据提供的函数对指定序列做映射. 第一个参数 function 以第二个参数序列中的每一个元素调用 function 函数,返回一个map对象. 语法 map() ...
- 子查询及pymysql
子查询 子查询指的是当一个查询语句被作为另一个查询语句的条件时,该查询语句就称之为子查询(内层查询) 可以将一个大问题 拆分几个小的问题 然后一步一步来查询 需求:财务不有哪些人 ),sex ),jo ...