SpringBoot中Mybatis-plus实体类属性名带有下划线,导致带有下划线的属性名返回值为null
问题展示
SpringBoot中Mybatis-plus实体类属性名带有下划线,导致带有下划线的属性名返回值为null
![下划线](https://img-blog.csdnimg.cn/b76b9156322f44cfa68740415115e321.png#pic_center)
访问接口后的list中实体类属性名带下划线的值全为null
![返回值为null](https://img-blog.csdnimg.cn/05c269a57f724a28a4720b1856f405b7.png#pic_center)
解决方法
关闭mybatis-plus自动将下划线转成驼峰格式
#关闭配置数据库下划线字段转驼峰
mybatis-plus.configuration.map-underscore-to-camel-case=false