在安裝 spring Boot 的工作目錄裡 1. 上傳 .p12 格式的憑證到 spring Boot 的工作目錄裡的 keystore 目錄 2. 找到 application.properties 設定檔 加入底下設定 # Server Port server.port=443 # The format used for the keystore. It could be set to JKS in case it is a JKS file server.ssl.key-store-type=PKCS12 # The path to the keystore containing the certificate server.ssl.key-store=keystore/twcassl.p12 # The password used to generate the certificate server.ssl.key-store-password=[here is yourpassword] # The alias mapped to the certificate server.ssl.key-alias=twcassl 參考文件 1. https://www.baeldung.com/spring-boot-https-self-signed-certificate 2. https://docs.spring.io/spring-boot/docs/1.2.3.RELEASE/reference/html/howto-embedded-servlet-containers.html
留言