# MyBatis

> SQL mapper persistence framework for Java

Source: https://talira.ai/catalog/mybatis-ba3d1sm1
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Framework, Library
- Categories: [libraries / databases / sql toolkits](https://talira.ai/categories/libraries/databases/sql-toolkits), [libraries / databases / orm](https://talira.ai/categories/libraries/databases/orm), [languages / java](https://talira.ai/categories/languages/java)
- Licence: Apache-2.0[^2]
- Pricing: Free and open source[^1]
- Free tier: yes[^1]
- Backed by: [The MyBatis Team](https://talira.ai/orgs/mybatis.md)

MyBatis is a SQL mapper persistence framework for Java: it couples objects with your own SQL statements and stored procedures through XML mapper files or annotations, with dynamic SQL for conditional queries. It removes almost all of the JDBC code (setting parameters and retrieving results) and maps database records to primitives, Map interfaces and plain Java objects. Its makers name simplicity as the biggest advantage of this data mapper over object-relational mapping tools.

## Links

- Website: https://mybatis.org/mybatis-3/
- GitHub: https://github.com/mybatis/mybatis-3

## Problems it solves

- keep writing my own SQL in Java but stop hand-coding JDBC result mapping
- map rows from complex SQL queries and stored procedures to Java objects
- build SQL queries with optional filters in Java without string concatenation

## Features

- SQL in XML mapper files or annotations
- dynamic SQL for conditional queries
- stored procedure support
- advanced result mappings to POJOs, Maps and primitives
- removes most JDBC boilerplate
- Spring Boot starter (mybatis-spring-boot-starter) with auto-configuration

## Trust

Overall: 0.73 out of 1.
Signals: maintenance 1.00, adoption 0.86, momentum 0.63, community 1.00, backing 0.30, extensibility 0.00.

- last commit 2 days ago
- 182 commits in the last 90 days
- latest release mybatis-3.6.0 38 days ago
- 20.4k GitHub stars
- 307 contributors
- backed by The MyBatis Team

## Alternatives

- [jOOQ](https://talira.ai/catalog/jooq-syq7be6j.md): Typesafe SQL query builder and code generator for Java
- [doobie](https://talira.ai/catalog/doobie-swse7xhw.md): A pure functional JDBC layer for Scala

## Sources

[^1]: https://mybatis.org/mybatis-3/ (checked 28 Nov 2026)
[^2]: https://github.com/mybatis/mybatis-3/blob/master/LICENSE (checked 28 Nov 2026)
