• Stars
    star
    19,751
  • Rank 1,300 (Top 0.03 %)
  • Language
    Java
  • License
    Apache License 2.0
  • Created almost 12 years ago
  • Updated 27 days ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

MyBatis SQL mapper framework for Java

MyBatis SQL Mapper Framework for Java

build Coverage Status Maven central Sonatype Nexus (Snapshots) License 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.

Essentials

Contributions

Mybatis-core is now being auto formatted. Given nature of some code logic with mybatis, it is more appropriate to force a formatting structure manually for snippets such as sql statements. To do so, add following blocks around code.

  • // @formatter:off to start the block of unformatted code
  • // @formatter:on to end the block of unformatted code

If comment sections need same behaviour such as javadocs, note that the entire block must be around entire comment as direct usage does not properly indicate that formatter treats it all as one comment block regardless.

Tests

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

By default, we set <excludedGroups>TestcontainersTests</excludedGroups> which will exclude a subset of tests with @Tag('TestcontainersTests'). Further, if pre jdk 16, we will further exclude record classes from executions further reducing tests.

When using jdk 16+, we adjust the rule to <excludedGroups>TestcontainersTests,RequireIllegalAccess</excludedGroups>.

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

As of 2/20/2023, 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)

  • any OS + jdk 11 = 1730 tests
  • any OS + jdk 17 = 1710 tests
  • any OS + jdk 19 = 1710 tests
  • any OS + jdk 20 = 1710 tests
  • any OS + jdk 21 = 1710 tests

our adjustments for GH actions where platform does matter

  • windows + jdk 11 = 1730 tests

  • windows + jdk 17 = 1710 tests

  • windows + jdk 19 = 1710 tests

  • windows + jdk 20 = 1710 tests

  • windows + jdk 21 = 1710 tests

  • linux + jdk 11 = 1765 tests

  • linux + jdk 17 = 1745 tests

  • linux + jdk 19 = 1745 tests

  • linux + jdk 20 = 1745 tests

  • linux + jdk 21 = 1745 tests

  • mac + jdk 11 = 1730 tests

  • mac + jdk 17 = 1710 tests

  • mac + jdk 19 = 1710 tests

  • mac + jdk 20 = 1710 tests

  • mac + jdk 21 = 1710 tests

More Repositories

1

generator

A code generator for MyBatis.
Java
5,281
star
2

spring-boot-starter

MyBatis integration with Spring Boot
Java
4,132
star
3

spring

Spring integration for MyBatis 3
Java
2,822
star
4

mybatis-dynamic-sql

SQL DSL (Domain Specific Language) for Kotlin and Java. Supports rendering for MyBatis or Spring JDBC Templates
Java
1,094
star
5

jpetstore-6

A web application built on top of MyBatis 3, Spring 3 and Stripes
Java
578
star
6

redis-cache

MyBatis Redis Cache adapter
Java
411
star
7

mybatipse

Eclipse plugin adding support for MyBatis SQL Mapper Framework.
Java
333
star
8

migrations

A command line Database migrations tool
Java
214
star
9

parent

The MyBatis parent POM which has to be inherited by all MyBatis modules
176
star
10

guice

Google Guice integration for MyBatis 3
Java
175
star
11

scala

The Scala version of MyBatis SQL Mapper
Scala
151
star
12

ehcache-cache

MyBatis EhCache adapter
Java
149
star
13

ibatis2mybatis

Tool to convert iBATIS 2 xml files to MyBatis3
XSLT
108
star
14

ibatis-2

iBATIS 2.x
Java
98
star
15

typehandlers-jsr310

MyBatis type handlers for JSR-310
Java
95
star
16

spring-native

Java
86
star
17

memcached-cache

MyBatis Memcached adapter
Java
72
star
18

ignite-cache

Adapter for Apache Ignite
Java
62
star
19

freemarker-scripting

FreeMarker plugin for MyBatis 3.2
Java
60
star
20

velocity-scripting

Velocity scripting plugin for MyBatis
Java
48
star
21

ibatis-spring

Ibatis integration code copied from Spring ORM 3.2.x branch
Java
28
star
22

cdi

MyBatis CDI Extension
Java
25
star
23

thymeleaf-scripting

Thymeleaf scripting plugin for MyBatis
Java
23
star
24

migrations-maven-plugin

Maven plugin for the MyBatis Migrations tool
Java
22
star
25

hazelcast-cache

MyBatis Hazelcast adapter
Java
21
star
26

mybatis.github.io

MyBatis public site
HTML
19
star
27

caffeine-cache

MyBatis cache adapter for Caffeine
Java
7
star
28

oscache-cache

OSCache support for MyBatis Cache
Java
7
star
29

typehandlers-threeten-extra

MyBatis type handlers for ThreeTen Extra (http://www.threeten.org/threeten-extra/)
Java
6
star
30

logo

MyBatis logo
5
star
31

base-bundle-descriptor

A maven-assembly-plugin descriptor to create binary distributions for all MyBatis modules
4
star
32

couchbase-cache

Couchbase cache adapter for MyBatis 3
Java
3
star
33

projects-aggregator

The pom for aggregator of mybatis projects
3
star
34

old-google-code-issues

Automatically exported from code.google.com/p/mybatis
2
star
35

committers-stuff

Resources for committers, like docs, instructions and so
2
star
36

mybatis-bom

MyBatis Bill of Materials
1
star