标签:ring template property star pack -- tag app 使用
<bean class="org.mybatis.spring.SqlSessionFactoryBean" id="sqlSessionFactory">
<property name="dataSource" ref="dataSource" />
<property name="configLocation"
value="classpath:resources/mybatis/Configuration.xml" />
</bean>
只有一个数据源时,只需要指定包就可以了,比如
<!-- 扫描映射器,自动创建 -->
<bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
<property name="basePackage" value="com.mapper.*" />
</bean>
若多个数据源 ,则需要指定 响应的数据源,注意 要使用sqlSessionTemplateBeanName 来装载
标签:ring template property star pack -- tag app 使用
原文地址:http://www.cnblogs.com/li-xy/p/7007066.html