- 在sql语句处使用别名
- 在mybatis-config.xml(全局配置文件)中开启驼峰命名规则
<settings>
<setting name="mapUnderscoreToCamelCase" value="true"/>
</settings>
- 在Mapper映射文件中使用resultMap来自定义映射规则
<resultMap type="要映射的类" id="自定义这个resultMap的名字">
</resultMap>
<settings>
<setting name="mapUnderscoreToCamelCase" value="true"/>
</settings>
<resultMap type="要映射的类" id="自定义这个resultMap的名字">
</resultMap>