SSL certificate integration in Spring boot Project

SSL certificate integration

SSL certificate setting applied in file To generate self signed SSL certificate use following command:

cd src/main/resources
keytool -genkeypair -alias local_ssl -keyalg RSA -keysize 2048 -storetype PKCS12 -keystore local-ssl.p12 -validity 365 -ext san=dns:localhost

Put following code into file
server.ssl.enabled: true
server.ssl.key-alias: local_ssl
server.ssl.key-store: classpath:local-ssl.p12
server.ssl.key-store-type: PKCS12
server.ssl.key-password: 12345678
server.ssl.key-store-password: 12345678

Open this URL:

For production use following command and use p12 file in application Convert .crt to .p12

openssl pkcs12 -export -out server.p12 -inkey server.key -in server.crt

Where server.key , is the server key . server.crt is cert file from CA or self sign

you can find source code here:

Published by Purab

I am Purab from India, Software development is my profession and teaching is my passion. Programmers blog dedicated to the JAVA, Python, PHP, DevOps and Opensource Frameworks. Purab's Github Repo Youtube Chanel Video Tutorials Connect to on LinkedIn

Leave a comment

Your email address will not be published.