跳至主要内容

博文

目前显示的是标签为“HazelCast”的博文

Caching with HazelCast

Spring Caching with HazelCast HazelCast   is a popular distributed caching solution, it provides Spring integration and also provides a   CacheManager   implementation. Get HazelCast HazelCast provides commercial and open source version, download an open source copy from the   community HazelCast website . Unzip it into your local system. And run it. Enable Caching Add   @EnableCaching(mode=AdviceMode.ASPECTJ)   annotation on the configuration class if you are using Java based configuration. @Configuration ... @EnableCaching(mode=AdviceMode.ASPECTJ) public class JpaConfig {...} Then, specify a   CacheManager   provider in your configuration. @Override @Bean public CacheManager cacheManager() { return new HazelcastCacheManager(hazelcastInstance()); } @Bean public HazelcastInstance hazelcastInstance() { ClientNetworkConfig networkConfig = new ClientNetworkConfig() .addAddress("localhost"); ClientConfig clientConfig = new Cl...