mybatis mapper接口,不同包下怎么配置
1个回答
展开全部
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE configuration PUBLIC "-//ibatis.apache.org//DTD Config 3.0//EN"
"http://ibatis.apache.org/dtd/ibatis-3-config.dtd">
<configuration>
<environments default="environment">
<environment id="environment">
<transactionManager type="JDBC" />
<dataSource type="POOLED">
<property name="driver" value="oracle.jdbc.OracleDriver" />
<property name="url"
value="jdbc:oracle:thin:@localhost:1521:xe" />
<property name="username" value="lhh" />
<property name="password" value="123456" />
</dataSource>
</environment>
</environments>
<mappers>
<!-- 这里配置不同报下的Mapper映射文件-->
1
2
<mapper resource="com/it/dao/EmpMapper.xml" />
<mapper resource="com/it/dao/DeptMapper.xml" />
</mappers>
</configuration>
<!DOCTYPE configuration PUBLIC "-//ibatis.apache.org//DTD Config 3.0//EN"
"http://ibatis.apache.org/dtd/ibatis-3-config.dtd">
<configuration>
<environments default="environment">
<environment id="environment">
<transactionManager type="JDBC" />
<dataSource type="POOLED">
<property name="driver" value="oracle.jdbc.OracleDriver" />
<property name="url"
value="jdbc:oracle:thin:@localhost:1521:xe" />
<property name="username" value="lhh" />
<property name="password" value="123456" />
</dataSource>
</environment>
</environments>
<mappers>
<!-- 这里配置不同报下的Mapper映射文件-->
1
2
<mapper resource="com/it/dao/EmpMapper.xml" />
<mapper resource="com/it/dao/DeptMapper.xml" />
</mappers>
</configuration>
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询