<bean id="sqlSessionFactoryBean" class="org.mybatis.spring.SqlSessionFactoryBean">
<property name="dataSource" ref="basicDataSource"></property>
<property name="mapperLocations" value="classpath:dv/dao/*Mapper.xml"></property>
<property name="typeAliasesPackage" value="dv.entity"></property>
<property name="configLocation" value="classpath:mybatis-config.xml"></property>
</bean>
如何在spring配置文件中注册mybatis配置文件
MyBatis配置详解
最新推荐文章于 2022-06-15 23:04:46 发布
本文详细介绍了MyBatis框架中SqlSessionFactoryBean的配置方法,包括数据源设置、映射文件位置、类型别名包及配置文件的位置指定。
2369

被折叠的 条评论
为什么被折叠?



