2
我想使用MongoDB的作爲cacche存儲中的Infinispan根據政策異常使用的MongoDB作爲Infinispan的緩存存儲
我張貼了與異常
一起造成異常的代碼的片段堅持清除的數據ConfigurationBuilder config = new ConfigurationBuilder();
MongoDBCacheStore strgBuilder = new MongoDBCacheStore();
ConfigurationBuilder b = new ConfigurationBuilder();
b.persistence()
.addStore(MongoDBCacheStoreConfigurationBuilder.class)
.host("localhost")
.port(27017)
.timeout(1500)
.acknowledgment(0)
.username("")
.password("")
.database("infinispan_cachestore")
.collection("entries");
/* DefaultCacheManager manager=new DefaultCacheManager(b.build());
Cache ch=manager.getCache();
ch.put("username","sogani"); */
final Configuration configcache = b.build();
MongoDBCacheStoreConfiguration store = (MongoDBCacheStoreConfiguration) configcache.persistence().stores().get(0);
例外,我得到的是
java.lang.NoSuchMethodException: org.infinispan.loaders.mongodb.configuration.MongoDBCacheStoreConfigurationBuilder.
任何指針將是一個很大的幫助 日Thnx。