SpringBoot整合MyBatis查询数据部分为null
比如,你可能会遇到如下情况:
{"groupId":null,"root":null,"groupName":null,"date":"2018-10-25 20:10:54.0","password":"123456"}
这是因为没有开启驼峰映射,在ORM过程中,数据库中的部分字段无法映射比如:
group_id->group_id
所以在yml文件中配置一下即可
mybatis:
configuration:
map-underscore-to-camel-case: true
然后就解决啦