iBATIS vs MyBatis
Harry
· 11 Sep 2026
· 7 views
Same Family, New Home
When iBATIS was renamed MyBatis, the framework was re-versioned to 3.x and adopted under a community home. The core design stayed the same; the packaging and some details changed.
What Changed
- Package names: com.ibatis.* became org.apache.ibatis.*.
- Versioning: iBATIS 2.x gave way to MyBatis 3.x and later 3.5.x.
- Mapper APIs: MyBatis popularised Java mapper interfaces that pair with XML, replacing the string-keyed statement calls.
- Dynamic SQL tags: richer <where>, <set>, <foreach> in MyBatis 3.
- Spring integration: first-class mybatis-spring modules.
What Stayed the Same
- SQL-first philosophy: you write the SQL.
- XML mapper files with parameter and result maps.
- Session-style access via SqlSession (formerly SqlMapClient).
- The #{} parameter binding that prevents injection.
Key Points
- MyBatis is iBATIS renamed and modernised.
- Packages, versions and mapper APIs changed most.
- Concepts and XML structure carried over.
- Today you should write new code in MyBatis 3.