报错
Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is feign.FeignException: status 405 reading ProductClient#listForOrder(List); content:
{"timestamp":"2018-10-15T02:59:36.639+0000","status":405,"error":"Method Not Allowed","message":"Request method 'POST' not supported","path":"/product/listForOrder"}] with root cause
原因,我使用了
@RequestBody
使用了这个注解,就不能使用@GetMapping而是使用@PostMapping
只有单个参数@RequestParam或者无参的时候,可以使用@GetMapping
或者@PathVariable @RequestBody两个注解连用可以使用@GetMapping