Add this type handler to your MyBatis SqlSessionFactory's configuration like so:
sessionFactory.getConfiguration()
.getTypeHandlerRegistry()
.register(UUID.class, UUIDTypeHandler);
Or to use with default null-value
sessionFactory.getConfiguration()
.getTypeHandlerRegistry()
.register(UUID.class, new UUIDTypeHandler(new UUID(0L, 0L));
When MyBatis encounters a UUID property during the mapping process, it will use this
class to convert the result from the DB to a UUID.