Enable HTTPS/SSL in SpringBoot

Steps to enable HTTPS :

  1. Generate HTTPS Certificate
    1. Create your own certificate from keytool
    2. Buy the certificate
    3. Generate free certificate from OpenSSL
  2. Make changes in application.properties
  3. Add Bean for ServletWebServerFactory

Generate HTTPS Certificate

Generating certificate using keytool

Add bootsecurity.p12 file into your resource folder of springboot

Make changes in application.properties

application.properties


Leave a Comment