Hazelcast与Spring启动

时间:2018-01-13 17:38:00

标签: java spring-boot ehcache hazelcast jcache

我是Hazelcast的新手,并开始使用Spring启动项目Hazelcast。现在我正在尝试将Hazelcast与弹簧靴相结合。很多人有不同的意见。但是JCache是​​集成Spring启动和Hazelcast的最佳方式吗?

1 个答案:

答案 0 :(得分:0)

@ kishore-josyula,Jcache只是将Hazelcast与Spring-Boot集成的一种方式。 Hazelcast是通过JCache和Spring Cache Annotations实现Spring Cache抽象的提供者之一。 (见https://docs.spring.io/spring-boot/docs/current/reference/html/boot-features-caching.html#_supported_cache_providers

Hazelcast IMap& JCache有不同的功能。你可以比较&决定:

http://docs.hazelcast.org/docs/latest/manual/html-single/index.html#map http://docs.hazelcast.org/docs/latest/manual/html-single/index.html#hazelcast-jcache

我建议你先使用默认的IMap整合&如果您对使用Jcache没有任何要求,请查看它是如何工作的。看一些例子:

https://github.com/hazelcast/hazelcast-code-samples/tree/master/hazelcast-integration/spring-cache-manager https://github.com/gokhanoner/hazelcast-spring-cache-readtimoeut