1.新建模块

2.在pom.xml中引入MyBatis的jar包

idea搭建MyBatis

3.在src-main-resources中创建大配置文件mybatis-config.xml

idea搭建MyBatis

4.编写大配置文件

idea搭建MyBatis

5.搭建项目结构

idea搭建MyBatis


6.在DAO层创建小配置文件,文件名与接口一致

idea搭建MyBatis

7.编写小配置文件,id与接口中的方法名保持一致

idea搭建MyBatis

8.在src-test创建测试类

idea搭建MyBatis

9.编写测试代码

idea搭建MyBatis

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-22
  • 2021-10-23
  • 2022-01-19
  • 2021-12-05
猜你喜欢
  • 2021-11-22
  • 2021-08-25
  • 2022-12-23
  • 2021-11-17
  • 2021-07-03
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案