实施方法: <bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean"> <property name="dataSource" ref="dataSource" /> <property name="configuration"> <bean class="org.apache.ibatis.session.Configuration"> <property name="mapUnderscoreToCamelCase" value="true"/> </bean> </property> </bean>
版本要求:
spring.version >= 4.2.5.RELEASE
mybatis.version >= 3.4.0
mybatis-spring.version >= 1.3.0
以前版本请使用 mybatis.config.xml
<configuration>
.........
</configuration>