美文网首页
SpringBoot https 端口一直占用

SpringBoot https 端口一直占用

作者: 忧郁的小码仔 | 来源:发表于2019-07-08 13:58 被阅读0次

今天配置https的时候,一直报下面的错误,启动不起来:

The Tomcat connector configured to listen on port 443 failed to start. The port may already be in use or the connector may be misconfigured.

换了几个端口,还是报这个错误,显然不是端口占用的问题了。到这里肯定是

the connector may be misconfigured

配置的问题了,又仔仔细细看了下配置文件,果然,配置jks证书的时候把JKS写成JKC了:

server.port=443
server.ssl.key-store=classpath:www.mymeizi.xyz.jks
server.ssl.key-store-password=f7513407n99dyxa
server.ssl.keyStoreType=JKC

这里把jks证书放到resource根目录,和.properties文件平级就可以了。腾讯云申请域名的时候也提供了免费SSL证书服务,一年期很是方便了。

相关文章

网友评论

      本文标题:SpringBoot https 端口一直占用

      本文链接:https://www.haomeiwen.com/subject/geyohctx.html