1 生成的mapper接口上打上注解

spring boot中使用mybatis的注意点!!!

2 在pom.xml中需要导入mysql(根据需要),jdbc和mybatis的依赖

spring boot中使用mybatis的注意点!!!

3 在主类上设置扫描

spring boot中使用mybatis的注意点!!!

4 com.mysql.cj.exceptions等报错是因为时区问题 在配置文件中加入

spring boot中使用mybatis的注意点!!!

5 在配置文件中指定mybatis的配置文件位置  classpath*:mapper/**/*.xml

spring boot中使用mybatis的注意点!!!

 

附:项目结构图

spring boot中使用mybatis的注意点!!!

 

相关文章:

  • 2021-12-26
  • 2021-05-15
  • 2018-05-23
  • 2021-08-02
  • 2022-12-23
  • 2021-12-28
  • 2022-12-23
猜你喜欢
  • 2022-01-16
  • 2022-03-03
  • 2021-06-25
  • 2021-07-21
  • 2022-12-23
  • 2021-06-03
相关资源
相似解决方案