如何使用带有 Java Spring 的 Azure 应用服务证书来启用 SSL

How to use an Azure App Service Certificate with Java Spring to enable SSL

我想将使用 JHipster 生成的 Spring 启动应用程序部署到 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>

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

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

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

更详细的解释可以参考这个post: