<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:tx="http://www.springframework.org/schema/tx"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd">
<!-- 数据映射器类 mapper bean -->
<bean id="RenyuanDao" class="org.mybatis.spring.mapper.MapperFactoryBean">
<property name="sqlSessionFactory" ref="SqlSessionFactory" />
<!-- 注意指定的映射器类必须是一个接口,而不是具体的实现类 -->
<property name="mapperInterface" value="com.haso.bscsserver.dao.RenyuanDao" />
</bean></beans>
Spring、MyBatis的整合数据映射器类(UserMapper->iocContext.xml)配置文件详解
最新推荐文章于 2022-11-10 23:22:11 发布