# mybatis/spring

Spring integration for MyBatis 3

Repository: https://github.com/mybatis/spring
Canonical: https://ross.abutalabs.com/products/mybatis-spring
Language: Java
License: Apache-2.0
License Family: permissive
Topics: java, mybatis, spring
Last push: 2026-08-26T15:09:23+00:00

## Health v2 (maintenance only)
Score: 88/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 99, release rhythm 68, longevity 100
- inputs: {"age_days": 4945, "days_push": 7, "days_rel": 53, "gap_med": 173, "n_releases_24m": 4}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2938, forks 2638 (observed 2026-08-28T04:07:30.961765+00:00)

## What it is
An official adapter that bridges the MyBatis 3 SQL mapping framework with the Spring Framework, providing integration for transactions, mappers, and Spring Batch. It is published to Maven Central and actively maintained with branches for Spring 5, 6, and 7.

## Use cases
- integrate mybatis with spring
- use mybatis mappers as spring beans
- manage mybatis sql sessions with spring transactions
- use mybatis with spring batch
- wire mybatis into a spring boot application

## When to choose
- you use MyBatis for SQL mapping and Spring for dependency injection and transactions
- you want MyBatis mappers injected as Spring beans with transactional session management
- you need Spring Batch integration with MyBatis

## When to avoid
- you use JPA/Hibernate instead of MyBatis
- your project does not use the Spring Framework
- you need a standalone MyBatis setup without Spring

## Facets
- artifact type: library
- maturity: active
- function: orm, database, middleware
- domain: databases, backend, web-development
- platform: jvm
- tags: mybatis, spring, sql-mapping, integration-adapter

## Member repositories
- mybatis/spring (main) score 88

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:07:30.961765+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-30T07:33:05.945467+00:00, confidence not recorded.
  - readme: https://github.com/mybatis/spring (fetched 2026-08-28T04:07:30.961765+00:00, sha ce1ce7d675b1)
- Data as of 2026-08-30T08:39:29.467469+00:00.
