【问题标题】:How to use an Azure App Service Certificate with Java Spring to enable SSL如何使用带有 Java Spring 的 Azure 应用服务证书来启用 SSL
【发布时间】:2019-09-13 18:08:33
【问题描述】:

我想将使用 JHipster 生成的 Spring Boot 应用程序部署到 Azure 应用服务并启用 HTTPS/SSL。我购买了应用服务证书并将其绑定到我的应用服务的自定义域。如何在 Spring 应用程序的配置文件中使用该证书?

我还将WEBSITE_LOAD_CERTIFICATES 变量设置为我的证书指纹。

server:
    port: 443
    ssl:
        key-store: keystore.p12
        key-store-password: <your-password>
        keyStoreType: PKCS12
        keyAlias: <your-application>

我不知道如何从这里访问证书。密钥库的路径是什么,如何获取密码和密钥别名?

【问题讨论】:

    标签: java azure spring-boot ssl jhipster


    【解决方案1】:

    您只需在 Azure 门户上为您的 Web 应用程序配置 SSL 证书。

    因为在您的 Spring Boot 应用程序之前有一个前端层。前端将处理与客户端的安全连接 (HTTPS),但使用 HTTP 与您的 Web 应用程序通信。

    更详细的解释可以参考这个帖子:Is current request being made over SSL with Azure deployment

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-11-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多