Spring Boot - enable and configure SSL certificate

后端 未结 4 510
Happy的楠姐
Happy的楠姐 2021-01-11 15:25

I have this certificates / files in order to enable SSL for my application:

I found out that this properties are needed for Spring Boot to enable HTTPS:

4条回答
  •  广开言路
    2021-01-11 16:08

    I'd suggest you create your KeyStore in JKS format:

     keytool -genkey -keyalg RSA -alias my_alias -keystore keystore.jks -storepass password -validity 360 -keysize 2048
    

    then add the configuration:

    server.port=8089
    server.ssl.enabled=true
    server.ssl.key-store=src/main/resources/keystore.jks
    server.ssl.key-store-password=****
    server.ssl.keyStoreType=JKS
    server.ssl.keyAlias=my_alias
    

提交回复
热议问题