在mybatis配置文件中加入了驼峰式命名<settings> <setting name="mapUnderscoreToCamelCase" value="false"/><!--驼峰式命名导致属性下划线去除,与bean对应不上了 --> </settings>而数据表的属性命名是采用了下划线,在与bean匹配的时候会因为驼峰式命名去掉了下划线,结果是不管怎么改代码始终没有错误,但是数据库值返回的是空
<settings> <setting name="mapUnderscoreToCamelCase" value="false"/><!--驼峰式命名导致属性下划线去除,与bean对应不上了 --> </settings>