Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
S

spring-native

> 后端框架
Open source

MyBatis integration with Spring Native feature The project that the MyBatis integration with Spring Native feature. Requirements Java 11+ G…

100 stars0 likes2 views
WebsiteGitHub

About

MyBatis integration with Spring Native feature The project that the MyBatis integration with Spring Native feature. Requirements Java 11+ G…

MyBatis integration with Spring Native feature

The project that the MyBatis integration with Spring Native feature.

Requirements

  • Java 11+
  • GraalVM
  • Spring Boot 2.6.3+
  • Spring Native 0.11.2+
  • MyBatis Spring 2.0.7+
  • MyBatis Spring Boot 2.2.2+

Essentials

  • Quick Start
  • Reference documentation

Translations

  • Reference documentation (简体中文)
  • Reference documentation (한국어)

How to install on your application

Specify the mybatis-spring-native-core on pom.xml as follows:

Maven:

xml

  
    org.mybatis.spring.native
    mybatis-spring-native-core
    0.1.0-SNAPSHOT
  

Gradle:

groovy
dependencies {
  compile("org.mybatis.spring.native:mybatis-spring-native-core:0.1.0-SNAPSHOT")
}

If you use other extension modules provided by mybatis, please specify the mybatis-spring-native-extensions instead of mybatis-spring-native-core.

Maven:

xml

  
    org.mybatis.spring.native
    mybatis-spring-native-extensions
    0.1.0-SNAPSHOT
  

Gradle:

groovy
dependencies {
  compile("org.mybatis.spring.native:mybatis-spring-native-extensions:0.1.0-SNAPSHOT")
}

Add Sonatype OSS snapshot repository when use MyBatis's snapshot modules.

Maven:

xml

  
    sonatype-oss-snapshots
    Sonatype OSS Snapshots Repository
   https://oss.sonatype.org/content/repositories/snapshots
  

Gradle:

groovy
repositories {
  maven { url "https://oss.sonatype.org/content/repositories/snapshots" }
}

How to build

If you want to build this project, please will execute following procedures.

NOTE: Pre Conditions

Need to following environment variables are defined.

  • JAVA_HOME
  • GRAALVM_HOME

All modules

./mvnw -Pnative clean package

WARNING:

Building all modules takes long time.

Core module and specific sample module

./mvnw -pl core,samples/simple -Pnative clean package

NOTE:

Please replace the 'simple' part on above example to sample's suffix value(e.g. xml, sqlprovider and more) that you want to build.

Extension module and specific sample module

./mvnw -pl core,extensions,samples/thymeleaf -Pnative clean package

How to run a sample

Execute the following command when the build is completed.

Run with Native Image

./samples/simple/target/mybatis-spring-native-sample-simple
…

Run with executable jar

./samples/simple/target/mybatis-spring-native-sample-simple-exec.jar
…

Related Links

  • https://spring.io/blog/2021/12/29/go-go-graalvm-with-spring-native-my-adventures-in-native-image-ville
  • https://joshlong.com/jl/blogPost/mybatis-and-spring-native.html
  • https://github.com/spring-projects-experimental/spring-native/issues/404
  • https://www.youtube.com/watch?v=EWWq3ts9Tv4&t=1s

Special Thanks

Thanks for helping this project creation!!

  • Josh Long(@joshlong)
    Josh provided the first sample application.

  • Stéphane Nicoll(@snicoll)
    Stéphane resolved and helped some issues for running MyBatis on native image.

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Javajavaspring

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 18, 2026
Category后端框架
PricingOpen source

> Related tools

N
Node.js
基于 V8 的 JavaScript 运行时
D
Django
Python 高级 Web 框架
S
Spring Boot
Java 生态主流微服务框架