mybatis开启数据库字段自动映射为java驼峰命名规则
程序员文章站
2022-04-26 23:28:54
...
原文地址:http://blog.csdn.net/u013761206/article/details/60765080
在myBatis的全局配置文件中做如下的配置:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE configuration PUBLIC "-//mybatis.org//DTD Config 3.0//EN" "http://mybatis.org/dtd/mybatis-3-config.dtd">
<configuration>
<settings>
<setting name="mapUnderscoreToCamelCase" value="true"/>
</settings>
</configuration>