一、 微服务调用接口,若参数为@RequestBody对象,则需在@ReqeustMapping中添加consumes = MediaType.APPLICATION_JSON_VALUE
例如:@RequestMapping(value = “/test”,method = RequestMethod.POST, consumes =MediaType.APPLICATION_JSON_VALUE)
二、微服务调用接口,不能采用@GetMapping和@PostMapping,因为 @GetMapping 是@RequestMapping(method = RequestMethod.GET)的缩写 不支持@RequestMapping注解的consumes配置,所以当有@RequestBody时,会报错