Мой метод управления:
Код: Выделить всё
@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().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;
}
Ошибка: ошибка ввода-вывода при запросе POST для «https://myurl.com»: sun.security.validator. ValidatorException: не удалось построить путь PKIX: sun.security.provider.certpath.SunCertPathBuilderException: невозможно найти действительный путь сертификации к запрошенной цели; вложенным исключением является javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: не удалось построить путь PKIX: sun.security.provider.certpath.SunCertPathBuilderException: невозможно найти действительный путь сертификации к запрошенной цели
Кто-нибудь может мне помочь?
Подробнее здесь: https://stackoverflow.com/questions/555 ... springboot