Setting up a Secure Connection in a Spring Boot App

Stanislav Vain
The Startup
Published in
5 min readMay 23, 2020

--

How to Enable HTTPS in a Spring Boot Application

Photo by Micah Williams on Unsplash

Why SSL Certificate?

In today’s Internet, a secure connection is a standard. Have an HTTPS connection is a requirement for each website. Browsers of companies such as Google and Mozilla mark sites without a certificate as unsafe. There is a good reason for this. Without a certificate, you send your sensitive data to the server in a plain text format. What, of course, is a gift for attackers who want to intercept your data.

What is an SSL Certificate?

SSL stands for Secure Sockets Layer. TLS (Transport Layer Security) is an updated, more secure version of SSL. This is a standard technology providing a secure connection between the server and a client.

Setting up HTTPS for Spring Boot

Prerequisites

  • Spring boot 2
  • Jdk 11
  • Valid certificate (in case you want to use a real domain name)
  • Keytool (in case you want to use the localhost domain for testing)

Use an existing SSL certificate

--

--