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() { ...
随机推荐
- P1129 [ZJOI2007]矩阵游戏(二分图,网络流)
传送门 这推导过程真的有点可怕的说……完全想不出来…… 最终状态是$(1,1),(2,2),(3,3)...(n,n)$都有一个黑点 我们可以理解为每一个行和列都形成了一个匹配 换句话说,只要$n$行 ...
- postgreSQL PL/SQL编程学习笔记(四)
Errors and Messages 1. Reporting Errors and Messages Use the RAISE statement to report messages and ...
- 使用webpack开发ES6程序的正确姿势
1.cnpm install babel-loader babel-core babel-preset-es2015 -D 2.cnpm install babel-plugin-transform- ...
- 关于 Linq to EF 的内存泄漏问题
查到一些解决方案: 1, http://www.codethinked.com/keep-your-iqueryable-in-check 自定义常用方法,屏蔽IQuery功能 ...
- 阻止datagrid填充已经获取到的远程数据
时光流逝,弹指挥间,不经意的一年又如路上一个动人的靓影悄然消失在视线里.我们往往都是先问自己,我们收获了什么,然后才想到我们付出了什么,很少有人先问自己这一年付出了什么,然后再去看所得.话不多说了,祝 ...
- [POI2007]ZAP-Queries 数学
题目描述 Byteasar the Cryptographer works on breaking the code of BSA (Byteotian Security Agency). He ha ...
- Httprequest 添加Cookie
string postData = "Inputs={\"BarCode\":\"" + barCode + "\"}" ...
- 递归缓存技术,缓存机制Memoization
先看一下代码: 再看一下执行时间: 可以看出第一个阶乘的执行时间是3ms,后面的由于缓存了之前的计算结果,所以直接返回结果. 原理就是缓存之前的计算,避免重复计算.关键在于建立缓存数组. 可以看一下执 ...
- Android Studio 常用应用
1.在控制台的Logcat中输出测试语句 package com.example.lucky.helloworld; import android.support.v7.app.AppCompatAc ...
- elementui 给 左侧功能栏 加上 el-scroll 时 , el-main 会 挤压 左侧导航栏..
解决方法... el-main 给上 style='width:0'........... 并不会影响 el-main 布局...