百科.dev
全部条目AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
S

spring-native

> 后端框架
开源

MyBatis 集成 Spring Native 功能 该项目包含 MyBatis 集成 Spring Native 功能。要求 Java 11+ G…

100 stars0 点赞0 次浏览
访问官网GitHub

工具介绍

MyBatis 集成 Spring Native 功能 该项目包含 MyBatis 集成 Spring Native 功能。要求 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 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Javajavaspring

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类后端框架
定价开源

> 相关工具

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