OSS Tanbou

keep SQL explicit while mapping query results into Java objects

About these scores

OSS scale score is an unbounded metric that log-compresses and weights Stars, Watchers, Forks, and Contributors. Discovery score is the current OSS scale score minus the score at discovery. Update pace is commits in the last 30 days, growth momentum is the OSS scale score difference within the recent observation window, and OSS health is a 0–100 rating based on available recency, Community Health, and release data.

Stars
20,450
Primary language
Java
License
Apache-2.0
Repository last updated
Sep 19, 2026
On this page

Overview

MyBatis is a Java SQL mapper framework that connects SQL defined in XML or annotations with parameter binding and result mapping into Java objects.

Features and best fit

Based on official documentation; not hands-on tested · Content checked:

Key features

Map SQL statements to Java methods explicitly

Mapper interfaces plus XML or annotations connect SQL, parameters, and result mappings.

Sources: [2][4]

Reduce JDBC boilerplate without hiding the SQL

Applications retain control of SQL while the framework handles repetitive statement and result-mapping work.

Sources: [4]

Best fit

Fits Java applications that want SQL to remain reviewable

It works well with existing schemas and database-specific SQL when teams want less mapping code but explicit queries.

Sources: [4]

Before adoption

Its design differs from query-generating ORMs

The application still owns SQL design, indexing decisions, and transaction boundaries.

Sources: [4]

Check the 3.5.19 integration baseline before adoption

Confirm Java, JDBC driver, database, and framework-integration compatibility for the target application.

Sources: [3][4]

Official sources

  1. [1]mybatis/mybatis-3 repository(2026-09-30)
  2. [2]MyBatis README(2026-09-30)
  3. [3]MyBatis 3.5.19 release(2026-09-30)
  4. [4]MyBatis documentation(2026-09-30)
Supplemental curator note

MyBatis fits Java applications that want to keep SQL explicit while delegating parameter and result mapping to a framework. It is especially useful when SQL control matters more than ORM-style query generation.

Try it in 3 steps

  1. 1

    Add MyBatis 3.5.19

    Add the released artifact from Maven Central.

    implementation("org.mybatis:mybatis:3.5.19")
  2. 2

    Define a mapper interface

    Define the mapper method the application will call, adapting the Java or Kotlin signature to the project.

    interface BlogMapper { fun selectBlog(id: Int): Blog }
  3. 3

    Add the SQL mapping

    Map the SQL and result type in XML, then verify parameter binding and mapping against a real database.

    <select id="selectBlog" resultType="Blog">SELECT * FROM blog WHERE id = #{id}</select>
Check the official README

Growth

Growth trends · Last 30 days

20,450 Stars

Trend data is still being collected.

Built with

Categories and tags

Categories

GitHub data

GitHub dataView detailed GitHub data

GitHub Topics

  • java
  • mybatis
  • sql
Stars
20,450
Forks
12,848
Watchers
1,129
Open issues
212
Owner type
Organization
Primary language
Java
License
Apache-2.0
Repository last updated
Sep 19, 2026
Write a related article

Share a guide or use case for this OSS in Markdown. Articles are published after administrator approval.

Report incorrect information

Tell us if any listing information is incorrect or outdated.

After reading this page, do you know what to do next?