Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/369.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 无法导入类CloudStorageAccount_Java_Azure Functions - Fatal编程技术网

Java 无法导入类CloudStorageAccount

Java 无法导入类CloudStorageAccount,java,azure-functions,Java,Azure Functions,我有一个JavaAzure函数。我想用blob输出构建服务总线触发函数。服务总线消息采用JSON格式。我想按小时将内容附加到CSV 我正在看一个从写入blob的示例,但在导入时出错。有什么建议吗 import com.microsoft.azure.storage.CloudStorageAccount; // cannot be resolved. 错误: package com.topictriggerdatalakeoutput; import com.microsoft.azure.

我有一个JavaAzure函数。我想用blob输出构建服务总线触发函数。服务总线消息采用JSON格式。我想按小时将内容附加到CSV

我正在看一个从写入blob的示例,但在导入时出错。有什么建议吗

import com.microsoft.azure.storage.CloudStorageAccount; // cannot be resolved.
错误:

package com.topictriggerdatalakeoutput;

import com.microsoft.azure.functions.annotation.*;
import com.microsoft.azure.functions.*;

import com.microsoft.azure.storage.CloudStorageAccount; // cannot be resolved.

/**
 * Azure Functions with Service Topic Trigger.
 */
public class TopicTriggerDatalakeOutput {
/**
 * This function will be invoked when a new message is received at the Service Bus Topic.
 */
@FunctionName("TopicTriggerDatalakeOutput")
public void run(
    @ServiceBusTopicTrigger(
        name = "message",
        topicName = "MyTopic",
        subscriptionName = "MyTopicDataLakeSubscription",
        connection = "sbconnstring"
    )
    String message,

    final ExecutionContext context
) {

    String storageConnectionString = System.getenv("DataLakeconnstring");

    CloudStorageAccount storageAccount; // cannot be resolved

    //blobClient = storageAccount.createCloudBlobClient();
    //container = blobClient.getContainerReference("quickstartcontainer");

}

}

您需要将存储依赖项添加到pom.xml文件中。然后将删除此错误

<!-- https://mvnrepository.com/artifact/com.microsoft.azure/azure-storage -->
<dependency>
    <groupId>com.microsoft.azure</groupId>
    <artifactId>azure-storage</artifactId>
    <version>8.6.0</version>
</dependency>

com.microsoft.azure
azure存储
8.6.0