一:添加依赖

二::编写mybatis-generator.xml 生成mapper、xml、entity

三:配置扫描xml文件

tk.mybatis使用总结

四:运用tk.mybatis的mapperscan注解扫描mapper文件(要注意)

tk.mybatis使用总结

详细地址:spring boot mybatis-generator 使用tk.mybatis.mapper通用mapper自动生成代码

控制台打印mapper产生的sql:修改application.properties

logging.level.com.hw.dao=debug
#com.hw.dao是你的dao层的包路径

 

相关文章:

  • 2021-09-07
  • 2022-12-23
  • 2021-07-12
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-02-07
  • 2021-11-02
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-09-27
  • 2020-12-25
  • 2021-12-03
  • 2021-09-14
  • 2021-12-10
相关资源
相似解决方案