【问题标题】:Official spring-boot SSL examples failing官方 spring-boot SSL 示例失败
【发布时间】:2018-03-11 22:33:55
【问题描述】:

我发现 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”,而是

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

这些示例项目对其他人有用吗?

【问题讨论】:

    标签: spring-boot


    【解决方案1】:

    对我来说,它运作良好。这是我所做的:

    克隆 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上打开浏览器,接受自签名证书并阅读hello word消息。

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

    【讨论】:

    • 谢谢!对我来说绝对是一种木偶主义。我没有完成的步骤是最后一步,打开浏览器到localhost:8443。已经是深夜了,我开到localhost:8443(http结尾没有s)
    猜你喜欢
    • 1970-01-01
    • 2018-07-21
    • 2017-01-11
    • 2020-02-04
    • 2021-06-29
    • 2015-03-28
    • 2020-09-11
    • 2017-07-10
    • 1970-01-01
    相关资源
    最近更新 更多