【问题标题】:Moving My Existing Spring APP to HTTPS将我现有的 Spring APP 迁移到 HTTPS
【发布时间】:2015-10-27 19:59:07
【问题描述】:

我希望我的应用应该使用一些带有 ssl 的第三方 API。

第 1 步:我在主目录 keytool -genkey -alias tomcat -keypass mypassword -keystore TestKeyStore.keystore -storepass mypassword -keyalg RSA -validity 360 -keysize 2048 中创建了密钥

第 2 步:我在 eclipse 的 server.xml 中添加了连接器

<Connector port="8443" SSLEnabled="true" maxThreads="150"
            minSpareThreads="25" maxSpareThreads="75" enableLookups="true"
            disableUploadTimeout="true" acceptCount="100" debug="0" scheme="https"
            secure="true" clientAuth="false" sslProtocol="TLS"
            keystoreFile="/media/prashant/important/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/conf/TestKeyStore.keystore"
            keystorePass="mypassword" />

当我重新启动项目时,tomcat 启动时间很长,最后什么也没显示。我试图增加启动时间也对我没有帮助。知道我缺少什么吗?

【问题讨论】:

  • 粘贴你的 catalina.out 的内容,你会在那里得到一个错误。此外,Spring 不会神奇地转移到 https。在您的 Spring-Security 配置中,您必须在 https 下指明您想要的 URL。

标签: eclipse spring tomcat ssl https


【解决方案1】:

请提供更多信息。但我会检查您是否在防火墙中允许端口 8443。要检查它是否允许,(如果它是 Linux 机器)运行 telnet 8443。您将连接,这意味着它允许。否则,日志中的详细信息会有所帮助

【讨论】:

    猜你喜欢
    • 2016-03-07
    • 2015-10-03
    • 2019-01-27
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2010-10-06
    相关资源
    最近更新 更多