title: I/O error on POST request for in SPRINGBOOT
body: <p>I have googled it with issue. But those are not able to solve my problem.I have an issue with the SSL certificate in my code while calling a rest control.</p>
  
  <p>My control method is:</p>
  
  <pre><code>@CrossOrigin(origins = "http://localhost:4200")
  @RequestMapping(value = "/token", method = RequestMethod.POST, produces = "application/json")
  public @ResponseBody TokenModel GetToken(@RequestBody RequestBodyJson requestBodyJson) {
      TokenModel response = null; 
      RestTemplate restTemplate = new RestTemplate();
      try {                          
          response = new GenericRestClient&lt;RequestBodyJson, TokenModel&gt;().execute(
              new RequestDetails(url, HttpMethod.POST), requestBodyJson, responseHandler,TokenModel.class);
          restTemplate.getForEntity(url , TokenModel.class);
      } catch (Exception e) {
          System.out.println(e.getMessage());
      }
      return response;
  }
  </code></pre>
  
  <blockquote>
    <p>Error is:-I/O error on POST request for "<a href="https://myurl.com" rel="nofollow noreferrer">https://myurl.com</a>": sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target; nested exception is javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target</p>
  </blockquote>
  
  <p>can anyone can help me here?</p>