MyBatis Couchbase integration - Reference Documentation

Couchbase is the official driver for Couchbase when working with Java (or on the JVM). It provides management, CRUD and query facilities through both asynchronous and synchronous APIs..

Users that want to use Couchbase into their applications, have to download the 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-couchbase</artifactId>
    <version>1.0.0-SNAPSHOT</version>
  </dependency>
  ...
</dependencies>

then, just configure it in the mapper XML

<mapper namespace="org.acme.FooMapper">

  <cache type="org.mybatis.caches.couchbase.CouchbaseCache"/>

  ...

</mapper>

Requirements

Follows below the version requirements:

MyBatis-Couchbase Couchbase
1.0.x 2.2.x

Adapters

There are just one Couchbase cache adapters.

Bean Description
org.mybatis.caches.couchbase.CouchbaseCache No-logging adapter.

Logging versions of the adapter log cache hit ratios using the namespace as a looger.

Please refer to the official documentation to know more details how to configure Couchbase as Cache.