官方的spring-boot SSL示例失败了

时间:2017-09-30 01:20:10

标签: spring-boot

我发现spring-boot项目中提供的SSL示例对我不起作用。

对于这个例子:

https://github.com/spring-projects/spring-boot/tree/1.5.x/spring-boot-samples/spring-boot-sample-tomcat-ssl/src/main/java/sample/tomcat/ssl

这个例子:

https://github.com/spring-projects/spring-boot/tree/1.5.x/spring-boot-samples/spring-boot-sample-tomcat-multi-connectors

而不是'hello world',我得到了

enter image description here

启动日志似乎没有显示任何问题。

这些示例项目是否适用于其他项目?

1 个答案:

答案 0 :(得分:0)

对我而言,它运作良好。这是我做的:

克隆Spring Boot存储库:

git clone https://github.com/spring-projects/spring-boot

签出1.5.7分支

git checkout v1.5.7.RELEASE

构建

mvn package

运行

java -jar target/spring-boot-sample-tomcat-ssl-1.5.7.RELEASE.jar

然后在https://localhost:8443上打开浏览器,接受自签名证书并阅读问候语消息。

P.S。:我使用的是Oracle JDK 1.8.0_144和maven 3.5.0