# mybatis-flex/mybatis-flex

mybatis-flex is an elegant Mybatis Enhancement Framework

Repository: https://github.com/mybatis-flex/mybatis-flex
Canonical: https://ross.abutalabs.com/products/mybatis-flex
Homepage: https://mybatis-flex.com
Language: Java
License: Apache-2.0
License Family: permissive
Topics: java, mybatis, mysql, orm, sql
Last push: 2026-07-26T10:45:46+00:00

## Health v2 (maintenance only)
Score: 92/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 94, release rhythm 91, longevity 91
- inputs: {"age_days": 1283, "days_push": 38, "days_rel": 63, "gap_med": 22, "n_releases_24m": 20}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2661, forks 257 (observed 2026-08-28T04:07:07.488156+00:00)

## What it is
MyBatis-Flex is a lightweight enhancement framework for MyBatis that adds fluent QueryWrapper-based CRUD, pagination, multi-table queries, and entity-free row mapping without any third-party dependencies beyond MyBatis itself. It integrates with Spring Boot 2/3/4 and Solon, and uses APT code generation for type-safe, IDE-friendly SQL building.

## Use cases
- build type-safe SQL queries in Java without writing XML mappers
- add CRUD and pagination to a Spring Boot app with MyBatis
- query databases without entity classes using row mapping
- support multiple database dialects in one codebase
- implement logical delete and optimistic locking in MyBatis
- replace MyBatis-Plus with a lighter, faster alternative
- mask sensitive data fields automatically on query results

## When to choose
- you use MyBatis with Spring Boot or Solon and want fluent, type-safe queries
- you need a MyBatis enhancement with minimal dependencies and no SQL parsing overhead
- you want multi-table joins, composite primary keys, and pagination out of the box
- you need entity-free row-level database access

## When to avoid
- you use JPA/Hibernate or a non-Java stack
- you already depend on MyBatis-Plus and cannot remove it (they conflict at startup)
- you rely heavily on MyBatis interceptor plugins like PageHelper
- you need a full ORM with schema migration and entity relationship management

## Facets
- artifact type: library
- maturity: active
- function: orm, database, database-driver
- domain: databases, backend, web-development, developer-tools
- platform: jvm, windows
- tags: mybatis, spring-boot, query-wrapper, sql-builder, multi-database, pagination, data-masking, logical-delete, optimistic-locking, linux, macos

## Member repositories
- mybatis-flex/mybatis-flex (main) score 92

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:07:07.488156+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T02:18:22.965895+00:00, confidence not recorded.
  - readme: https://github.com/mybatis-flex/mybatis-flex (fetched 2026-08-28T04:07:07.488156+00:00, sha bd46e20d9da4)
  - homepage: https://mybatis-flex.com (fetched 2026-08-29T10:01:16.717118+00:00, sha 40eaa58923a6)
  - site_page: https://mybatis-flex.com/zh/intro/getting-started.html (fetched 2026-08-29T10:01:16.723143+00:00, sha 299c611aeb03)
  - site_page: https://mybatis-flex.com/zh/faq.html (fetched 2026-08-29T10:01:16.720578+00:00, sha 6a253be4dfb9)
- Data as of 2026-08-30T08:39:29.467469+00:00.
