我下面Azure的基於Java API此基礎教程:https://www.windowsazure.com/en-us/develop/java/how-to-guides/table-service/#CreateTableAzure的表存儲:無法創建一個表,一個CloudTableClient實例
但遇到了以下錯誤:
cannot find symbol
symbol : method createTableIfNotExists(java.lang.String)
location: class com.microsoft.windowsazure.services.table.client.CloudTableClient
小程序(從Azure教程複製):
import com.microsoft.windowsazure.services.core.storage.*;
import com.microsoft.windowsazure.services.table.client.*;
import com.microsoft.windowsazure.services.table.client.TableQuery.*;
public class AzureTableWrite {
public static void main(String[] args) {
// Define the connection-string with your values
final String storageConnectionString =
"DefaultEndpointsProtocol=http;" +
"AccountName=skivvy;" +
"AccountKey=foobar";
// Retrieve storage account from connection-string
CloudStorageAccount storageAccount =
CloudStorageAccount.parse(storageConnectionString);
// Create the table client.
CloudTableClient tableClient = storageAccount.createCloudTableClient();
// Create the table if it doesn't exist.
String tableName = "people";
tableClient.createTableIfNotExists(tableName);
}
}
有沒有人遇到同樣的問題?任何幫助表示讚賞!
非常感謝您的快速回答。它的工作原理!你在哪裏訪問API文檔?我相信我需要看看其他課程。 –
我只是看了GitHub上提供的源代碼。剛剛在這裏找到了API文檔:http://dl.windowsazure.com/javadoc/。 HTH。 –
這又是非常有用的!感謝一羣Gaurav! –