Spring Boot RestTemplate no SSL check

Problem By default the Spring RestTempalte and the swagger OpenAPI client does an SSL check. This is usually not required on the test system, as so the goal is to remove the SSL check from the Spring Boot Rest Template. RestTemplate Apache HTTP Client pom.xml Swagger OpenAPI Client Furthermore sometimes it is required to remove…

Java SSLContext and the SSLSocketFactory self-signed certificate

Problem Often we want to connect to create a secure SSL connection to an HTTPs endpoint which is secured by a self-signed Certificate. If we do so just with a simple call we usually face an nice exception like: Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested…