How can I set up a letsencrypt SSL certificate and use it in a Spring Boot application?

前端 未结 7 2076
长情又很酷
长情又很酷 2020-12-07 09:14

I\'m new to securing a server so I don\'t really know much about this but I need to get my Spring Boot Application that is running on a Digital Ocean Droplet to use HTTPS. <

7条回答
  •  一个人的身影
    2020-12-07 09:51

    1. Get an SSL certificate from letsencrypt
    2. Add it into a keystore using the keytool command in Java
    3. Configure your Spring application to use the keystore generated above

    The file should look like:

     server.port = 8443
     server.ssl.key-store = classpath:sample.jks
     server.ssl.key-store-password = secret
     server.ssl.key-password = password
    

提交回复
热议问题