gpt4 book ai didi

azure - 如何设置 EventHub 和 AzureWebJobsStorage 的值

转载 作者:行者123 更新时间:2023-12-03 05:17:17 24 4
gpt4 key购买 nike

我已在 Azure 门户中创建了一个事件中心和存储帐户,并使用 eventhub 触发器编写了一个 Azure 函数来触发该函数。

要在本地运行此函数,我在 local.settings.json 中设置了“AzureWebJobsStorage”和“EventHubconnectionstring”,效果很好。

如果我将此函数部署到 Azure 门户,如何设置“EventHubconnectionstring”和“AzureWebJobsStorage”值?会自动拾取吗?

最佳答案

当您从 Visual Studio 部署它时,值将变为 null。然后,您需要在功能应用程序中打开配置部分并在其中输入这些值,如下所示:

enter image description here

enter image description here

如果您使用 Vs code 进行部署,这些值将反射(reflect)在配置部分中。如果您遇到空连接字符串问题,则需要将其添加到配置部分然后保存。并且您应该对事件中心连接字符串执行相同的操作。

引用文献:

关于azure - 如何设置 EventHub 和 AzureWebJobsStorage 的值,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/74373922/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com