把以下内容写到mybatis配置文件中
<settings>
<setting name="mapUnderscoreToCamelCase" value="true" />
</settings>
然后可以在applicationContext.xml引用
<bean id="sqlSessionFactory"class="org.mybatis.spring.SqlSessionFactoryBean">
<property name="configLocation" value="classpath:mybatis.xml" />
</bean>
之后,你再创建mapper.xml写sql语句就直接开工吧
<select id="" parameterType="".........
不用去写映射对应的数据库字段了,挺方便的