java为什么getRequest()在Restservice中抛出NullPointerException?
我有春季休息服务和方法重要付款:
@RequestMapping(value = {"/importPayments"}, method = RequestMethod.POST)
public Map<String, List<Payment>> importPayments() throws IOException {
ImportPaymentsOutcome outcome = paymentService.importPayments(getRequest().getInputStream());
ImportPaymentsOutcomeModel importPaymentsOutcome = new ImportPaymentsOutcomeModel(outcome);
如何获取请求并从中提取inputStream
当我尝试调用getRequest()时,会出现NullPointerException
我尝试使用importPayments(HttpServletRequest请求)输入参数,但我需要使用空方法参数在新的参数上更改旧的REST
共 (0) 个答案