springboot FeignClient 请求接收json
来源:互联网 发布:易语言编程系统全书 编辑:程序博客网 时间:2024/05/29 19:41
package com.gy.api;import com.gy.vo.ResultList;import com.gy.vo.ResultObject;import com.gy.vo.msp.MspddVo;import com.gy.vo.msp.MspdpdVo;import org.springframework.cloud.netflix.feign.FeignClient;import org.springframework.http.MediaType;import org.springframework.web.bind.annotation.RequestBody;import org.springframework.web.bind.annotation.RequestMapping;import org.springframework.web.bind.annotation.RequestMethod;import org.springframework.web.bind.annotation.RequestParam;@FeignClient(url = "${kx.service.url}",name="mspurl")public interface MspDpdApi { @RequestMapping(value="/pdpd/list",method= RequestMethod.POST,consumes = MediaType.APPLICATION_JSON_VALUE) public ResultList<MspdpdVo> getList(@RequestBody MspdpdVo mspdpdVo) ;}
规范:声明consumes = MediaType.APPLICATION_JSON_VALUE
consumes跟produces不同,
consumes是请求端数据类型,一般跟RequestBody一起使用
produces是响应数据类型--ResultList<MspdpdVo>
阅读全文
0 0
- springboot FeignClient 请求接收json
- springboot接收json入参
- springboot调用外部接口FeignClient
- FeignClient的请求错误原因查看
- ajax请求接收返回json数据
- post请求传json后台接收不到
- SpringBoot使用Delete方式接收请求问题总结
- springBoot PUT请求接收不了参数的解决办法
- springboot FeignClient POST带参数无法传值问题
- 使用firefox插件httperrequest,模拟发送及接收Json请求
- 基本于Yii 的ajax json请求 接收处理
- 使用firefox插件httperrequest,模拟发送及接收Json请求
- 使用firefox插件httperrequest,模拟发送及接收Json请求
- ajax(json)请求发送至后台的接收处理
- 使用firefox插件httperrequest,模拟发送及接收Json请求
- springMVC发送和接收json请求的方法
- jquery的ajax异步请求接收返回json数据实例
- eclipse pydev django 接收 post 发来的 json 请求
- 人工智能+互联网后,医疗行业竟成最大受益者
- ansible小试
- 云计算
- 笔试题集
- ubuntu常用命令
- springboot FeignClient 请求接收json
- 模拟、SDI、AHD、网络摄像头的视频延时测量
- Linux部署Tomcat 并访问默认项目
- Quartz Spring 报错!自动注解! Couldn't retrieve trigger: ORA-00942: 表或视图不存在
- 04-面向对象(final关键字)1 04-面向对象(final关键字)2 05-面向对象(抽象类-概述).
- Java Web 程序员如何转型大数据
- 宏的使用
- java生成验证码
- SSH框架整合 基于 XML 的配置