sprintboot整合mybatis查询不出数据

数据库有数据,程序没有任何报错,但是查询结果没有数据,list显示[null,nul]。

检查了sql语句,以及controller、service、mapper,检查没发现问题,怀疑是字段映射问题。

配置mybatis支持驼峰映射:

application.properties:

mybatis.configuration.map-underscore-to-camel-case=true

application.yml

mybatis:
  configuration:
    map-underscore-to-camel-case: true

问题解决。

posted @ 2021-10-04 18:42  四叶笔记  阅读(457)  评论(0编辑  收藏  举报