现象描述:项目是使用springboot搭建,然后在阿里云上申请了一个免费的SSH证书,按照教程配置后,启动报如下的错误信息:
Caused by: java.lang.IllegalArgumentException: Private key must be accompanied by certificate chain at java.security.KeyStore.setKeyEntry(KeyStore.java:1136) ~[na:1.8.0_181] at org.apache.tomcat.util.net.SSLUtilBase.getKeyManagers(SSLUtilBase.java:357) ~[tomcat-embed-core-9.0.33.jar:9.0.33] at org.apache.tomcat.util.net.SSLUtilBase.createSSLContext(SSLUtilBase.java:247) ~[tomcat-embed-core-9.0.33.jar:9.0.33] at org.apache.tomcat.util.net.AbstractJsseEndpoint.createSSLContext(AbstractJsseEndpoint.java:97) ~[tomcat-embed-core-9.0.33.jar:9.0.33] ... 25 common frames omitted
springboot配置如下
后来查资料,是因为配置的关键子写错了 。截图中红框部分应该为:server.ssl.key-store-password