Why MyBatis-Guice - Motivation

In our daily work we've been strongly using both MyBatis Sql Mapper and Google Guice frameworks and once noticed we'd been continuosly repeating the same code snippets in different projects, according to the DRY don't repeat yourself principle, we started realizing something that alleviate us the task to create our stuff.

Indeed, this small library intends to create the missing perfect glue between the two popular frameworks, reducing the boilerplate and redundant code that users have to write to configure and use MyBatis into a Google Guice context.

A little bit of history

The mybatis-guice library was born during the Christmas' vacation in the far December 2009, with the name of iBaGuice on Google Code, created and maintained by the 99soft.org folks Marco Speranza and Simone Tripodi.

Since the two communities where strictly collaborating, Clinton Begin, the creator of the MyBatis project, invited Simone Tripodi to join the MyBatis team, bringing with him the iBaGuice code base to become an official MyBatis subproject.

By that day, the mybatis-guice project is maintained by the MyBatis.org team.


Before starting reading the manual, it is very important you're familiar with both MyBatis and Google Guice framework and therminology.

Like MyBatis and Google Guice, mybatis-guice requires Java 5 or higher.


A special thanks goes to all the special people who made the Google Guice integration a reality, above all Clinton Begin, who strongly believed on that MyBatis sub-project, and Marco Speranza, without him that project wouldn't exist.

Special acknowledgments go to Stephen Friedrich for providing an amazing patch, Poitras Christian who made the XML module a reality and Marzia Forli for the JRS330 feedbacks.