MyBatis EHCache integration - Reference Documentation
Hazelcast is an open source clustering and highly scalable data distribution platform for Java.
Users that want to use Hazelcast into their applications, have to download the zip zip bundle, decompress it and add the jars in the classpath; Apache Maven users instead can simply add in the pom.xml the following dependency:
<dependencies>
...
<dependency>
<groupId>org.mybatis.caches</groupId>
<artifactId>mybatis-hazelcast</artifactId>
<version>1.0.1</version>
</dependency>
...
</dependencies>then, just configure it in the mapper XML
<mapper namespace="org.acme.FooMapper"> <cache type="org.mybatis.caches.hazelcast.HazelcastCache"/> ... </mapper>
If users need to log cache operations, they can plug the Cache logging version:
<mapper namespace="org.acme.FooMapper"> <cache type="org.mybatis.caches.hazelcast.LoggingHazelcastCache"/> ... </mapper>
Please refer to the official Hazelcast Near Cache documentation to know more details how to configure Hazelcast as Cache.