原代码:
@FeignClient(name = "sc-inventory-operation")
public interface LockClient {
@RequestMapping(value = "/inventory/operation/searchLock", method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
APIResponse<LockInfo> searchInventoryLock(APIRequest apiRequest);
}
使用feign调用,怎么也调不到项目,请求不到
错误原因
改成这样就好了:
@FeignClient(name = "sc-inventory-operation")
public interface LockClient {
@RequestMapping(value = "/inventory/operation/searchLock", method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
APIResponse<LockInfo> searchInventoryLock(APIRequest apiRequest);
}