将jclouds从1.5升级到1.6并且类BlobStoreContextFactory
未被删除
我们曾经有一些单位测试代码
BlobStoreContextFactory contextFactory = new BlobStoreContextFactory();
BlobStoreContext blobStoreContext = contextFactory.createContext("transient", "identity", "credential");
但它不能再编译了。
[ERROR] /Users/davsclaus/workspace/camel/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/jclouds/BlobStoreBlueprintRouteTest.java:[27,28] error: cannot find symbol
[ERROR] symbol: class BlobStoreContextFactory
[ERROR] location: package org.jclouds.blobstore
我找不到来自http://jclouds.incubator.apache.org/documentation/releasenotes/1.6/
的1.6.0发行说明中的任何迁移指南等如何在没有工厂或其他方式的情况下创建BlobStoreContext
的任何指示?
答案 0 :(得分:1)
找到答案。有一个新的ContextBuilder
API可供使用。
BlobStore blobStore = ContextBuilder.newBuilder("transient").credentials("identity", "credential")
.buildView(BlobStoreContext.class).getBlobStore();