【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

三、效果