简体   繁体   English

Hazelcast + Spring Boot +缓存管理器

[英]Hazelcast + Spring Boot + Cache Manager

I'm trying to create an instance of Hazelcast client but I can't Override the Cache Manager implementation from Spring. 我正在尝试创建Hazelcast客户端的实例,但无法覆盖Spring的Cache Manager实现。 I don't want to use a hazelcast.xml (so, I'm in a spring boot application). 我不想使用hazelcast.xml(因此,我在Spring Boot应用程序中)。 There is a way to do it? 有办法吗?

Follow my test: 按照我的测试:

@Bean
CacheManager cacheManager() {
    return new HazelcastCacheManager();
}

I've read many tutorials talking about this kind of implementation but this not work on Hazelcast v 3.8.1 我已经阅读过许多关于这种实现的教程,但是在Hazelcast v 3.8.1上不起作用

The HazelcastCacheManager.java is an Interface not a class, so I cant initialize the interface like this... (...java basic). HazelcastCacheManager.java是一个接口,而不是一个类,所以我不能像这样初始化接口...(... java基本)。

Thanks. 谢谢。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM