99
1010[ 加入QQ群: 277256950] ( https://qm.qq.com/cgi-bin/qm/qr?k=ks1Y2WVNI1xjsqMlBzAkWmBMuYqDhVqZ&jump_from=webapi&authKey=U0CL8SDMS4wsJ8H9njVcNMbOW6Gb9AsxLfFB4jbxSKa0w0ChBX3wCms0+Cjzhekw )
1111
12+ ## 支持 jakarta.persistence-api
13+
14+ 添加依赖:
15+ ``` xml
16+ <dependency >
17+ <groupId >io.mybatis</groupId >
18+ <artifactId >mybatis-jakarta-jpa</artifactId >
19+ <version >2.2.0</version >
20+ </dependency >
21+ ```
22+
1223## 1. 快速入门
1324
1425这是一个不需要任何配置就可以直接使用的通用 Mapper,通过简单的学习就可以直接在项目中使用。
@@ -36,24 +47,23 @@ MyBatis Mapper 要求 MyBatis 最低版本为
3647<CodeGroupItem title =" Maven " active >
3748
3849``` xml
39-
4050<dependencies >
4151 <dependency >
4252 <groupId >io.mybatis</groupId >
4353 <artifactId >mybatis-mapper</artifactId >
44- <version >1. 2.2</version >
54+ <version >2.2.0 </version >
4555 </dependency >
4656 <!-- 使用 Service 层封装时 -->
4757 <dependency >
4858 <groupId >io.mybatis</groupId >
4959 <artifactId >mybatis-service</artifactId >
50- <version >1. 2.2</version >
60+ <version >2.2.0 </version >
5161 </dependency >
5262 <!-- 使用 ActiveRecord 模式时 -->
5363 <dependency >
5464 <groupId >io.mybatis</groupId >
5565 <artifactId >mybatis-activerecord</artifactId >
56- <version >1. 2.2</version >
66+ <version >2.2.0 </version >
5767 </dependency >
5868</dependencies >
5969```
@@ -63,11 +73,11 @@ MyBatis Mapper 要求 MyBatis 最低版本为
6373
6474``` groovy
6575dependencies {
66- compile("io.mybatis:mybatis-mapper:1. 2.2")
76+ compile("io.mybatis:mybatis-mapper:2.2.0 ")
6777 // 使用 Service 层封装时
68- compile("io.mybatis:mybatis-service:1. 2.2")
78+ compile("io.mybatis:mybatis-service:2.2.0 ")
6979 // 使用 ActiveRecord 模式时
70- compile("io.mybatis:mybatis-activerecord:1. 2.2")
80+ compile("io.mybatis:mybatis-activerecord:2.2.0 ")
7181}
7282```
7383
0 commit comments