springboot配置https报错org.springframework.boot.web.server.WebServerException: Unable to start embedded
后,一直报错org.springframework.boot.web.server.WebServerException: Unable to start embedded,后面发现博客中的配置要更改个地方。springboot版本如下。
·
我参考博客【Spring】Spring Boot 支持 Https-CSDN博客后,一直报错org.springframework.boot.web.server.WebServerException: Unable to start embedded,后面发现博客中的配置要更改个地方
我的执行语句
keytool -genkey -alias https -keyalg RSA -keysize 2048 -keystore D:\javahttps.p12 -validity 365
配置添加一行
ssl:
key-store: classpath:javahttps.p12
key-store-password: '000000'
key-alias: https
enabled: true #添加这行配置
springboot版本如下
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.2.0.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>

魔乐社区(Modelers.cn) 是一个中立、公益的人工智能社区,提供人工智能工具、模型、数据的托管、展示与应用协同服务,为人工智能开发及爱好者搭建开放的学习交流平台。社区通过理事会方式运作,由全产业链共同建设、共同运营、共同享有,推动国产AI生态繁荣发展。
更多推荐
所有评论(0)