mybatis-3 README

The project's README from github.com/mybatis/mybatis-3. As one markdown file: README.md.

MyBatis SQL Mapper Framework for Java

build Coverage Status Quality Gate Status Maven Central License Docs Stack Overflow Project Stats

mybatis

The MyBatis SQL mapper framework makes it easier to use a relational database with object-oriented applications. MyBatis couples objects with stored procedures or SQL statements using an XML descriptor or annotations. Simplicity is the biggest advantage of the MyBatis data mapper over object relational mapping tools.

Contributions

See here

Tests

Mybatis-3 code runs more expressive testing depending on jdk usage and platform.

By default, we set <excludedGroups>TestcontainersTests,RequireIllegalAccess</excludedGroups> which will exclude a subset of tests with @Tag('TestcontainersTests') and @Tag('RequireIllegalAccess').

When we run on ci platform, we further make adjustments as needed. See here for details.

As of 12/28/2024, using combined system + jdk will result in given number of tests ran. This will change as tests are added or removed over time.

without adjusting settings (ie use as is, platform does not matter)

our adjustments for GH actions where platform does matter

mybatis-3 (mybatis/mybatis-3)

Searching Database…

20.4K ·GitHub
这是什么?MyBatis 是一个 Java 的 SQL 映射框架,让面向对象的应用程序使用关系型数据库变得更简单。
它是像 Hibernate 那样的完整 ORM,还是更轻量的东西?更轻量的东西:MyBatis 是一个数据映射器——你自己写 SQL 或者调用存储过程,它把查询结果映射到你的 Java 对象里。简单易用正是官方宣称的、相对对象关系映射工具的最大优势。
我怎么告诉它要执行哪些 SQL?你可以在 XML 描述文件里声明映射,也可以用 Java 注解来写,两种风格随你选,看哪种更适合你的项目。
要用它的话我需要准备什么?一个 Java 运行环境和一个关系型数据库:它只是一个接入你应用的普通 Java 库,不是需要单独部署的服务器。
我用什么操作系统或 JDK 运行它有影响吗?只要 JVM 能跑的地方它就能跑。该项目在 Windows、Linux 和 macOS 上用 JDK 21 和 25 做测试,其中 Linux 上的测试套件覆盖的用例稍多一些。
这套代码的测试做得怎么样?非常充分:在任意操作系统上用 JDK 21 或 25 会跑大约 1,899 个自动化测试,在 Linux 上则增加到 1,934 个,而且截至 2024 年 12 月这套测试矩阵还在继续调整。
维护者是怎么保证质量的?仓库里配置了 GitHub Actions 工作流来跑测试,此外还有 CodeQL 安全扫描、Coveralls 覆盖率报告和 Sonar 代码分析。
MyBatis 现在还是活跃项目吗?是的——这个仓库从 2013 年就开始了,没有被归档,拥有大约 20,400 个 star,背后还有一套持续运行的 CI 流水线。
Creator
mybatis
Size
155.2 MB
Stars
20.4K
Age
13y
Commits · 90 Days