Java RestTemplate错误

Java RestTemplate错误,java,spring,controller,spring-boot,resttemplate,Java,Spring,Controller,Spring Boot,Resttemplate,我正在尝试调用此方法: @RequestMapping(method=RequestMethod.POST, value="v1/sendemail") public ResponseEntity sendPasswordResetEmail (@RequestParam("name") final String name, @RequestParam("password") final String

我正在尝试调用此方法:

@RequestMapping(method=RequestMethod.POST, value="v1/sendemail")
    public ResponseEntity sendPasswordResetEmail (@RequestParam("name")     final String name,
                                       @RequestParam("password") final String password,
                                       @RequestParam("email")    final String email)
    {
        final boolean success = notificationService.sendPasswordResetEmail(name, password, email);
        return success ?
                new ResponseEntity(HttpStatus.OK) : new ResponseEntity(HttpStatus.INTERNAL_SERVER_ERROR);
    }
我试着用三种不同的方式来称呼它,但没有一种有效:

RestTemplate restTemplate = new RestTemplate();
ResponseEntity<String> auth = restTemplate.postForEntity(url, entity, String.class);
ResponseEntity<String> auth2 = restTemplate.exchange(url, HttpMethod.POST, entity, String.class, (Object[]) null);
ResponseEntity<String> auth3 = restTemplate.postForObject(url, entity, ResponseEntity.class, new Object());
提前谢谢

更新:

网址:

实体:

<{password=H1!zsaddd486, name=John, email=john@gmail.com},{token=[token], API_KEY=[something], API_SECRET=[something]}>

你的“url”和“实体”是什么?至少在最后一次调用中,您将新对象传递到参数应该位于的位置be@freakman代码已更新。感谢您在服务器上的调试日志,并检查Spring告诉您的内容。另外,这是什么类型的HttpEntity?向我们展示你是如何创建它的。
<{password=H1!zsaddd486, name=John, email=john@gmail.com},{token=[token], API_KEY=[something], API_SECRET=[something]}>