Skip to main content

Posts

Showing posts from April, 2019

Enable SSL for Development Environment - Spring BOOT

1) Generate Self signed SSL Certificate      ========================== keytool -genkeypair -alias tomcat -keyalg RSA -keysize 2048 -keystore keystore.jks -validity 3650 keytool -list -v -keystore keystore.jks keytool -list -v -storetype pkcs12 -keystore keystore.p12 keytool -importkeystore -srckeystore keystore.jks -destkeystore keystore.p12 -deststoretype pkcs12 keytool -export -keystore keystore.jks -alias tomcat -file myCertificate.crt 2) Copy  keystore.p12 to java resource folder 3) Add the following to application properties # Define a custom port instead of the default 8080 server.port=8443 # Tell Spring Security (if used) to require requests over HTTPS security.require-ssl=true # The format used for the keystore  server.ssl.key-store-type=PKCS12  # The path to the keystore containing the certificate server.ssl.key-store=classpath:keystore.p12  # The password used to generate the certificate server....