【Java】Mybatis-Plus获取不到数据库表中的部分字段(带下划线_的字段)
一、问题
二、解决
在application.yml文件中添加
mybatis-plus:
configuration:
# mybatis-plus默认开启了下滑线转换驼峰 需要关闭(设置为false)
map-underscore-to-camel-case: false
或者在application.properties文件中添加
mybatis-plus.configuration.map-underscore-to-camel-case=false
三、效果
如果忍耐算是坚强 我选择抵抗 如果妥协算是努力 我选择争取