<!--配置数据源-->
<bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
<property name="dataSource" ref="dataSource"/>
<property name="mapperLocations" value="classpath:mapper/**"/>
<property name="configuration" ref="settings"></property>
</bean>
<!-- mybatis配置驼峰形式的设置类 -->
<bean id="settings" class="org.apache.ibatis.session.Configuration">
<property name="mapUnderscoreToCamelCase" value="true"></property>
</bean>
ssm直接在applicationContext.xml中配置驼峰命名(网上都是mybatis-config.xml和springboot的)
最新推荐文章于 2024-04-27 18:20:46 发布