问题描述
mapper文件绑定异常
org.apache.ibatis.binding.BindingException: Type interface cn.pdsu.yf.dao.IUserdao is not known to the MapperRegistry
解决办法:在pom.xml文件中加入以下代码
<!-- 如果不添加此节点mybatis的mapper.xml文件都会被漏掉。 -->
<build>
<resources>
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*.properties</include>
<include>**/*.xml</include>
</includes>
<filtering>true</filtering>
</resource>
<resource>
<directory>src/main/resources</directory>
<includes>
<include>**/*.properties</include>
<include>**/*.xml</include>
</includes>
<filtering>true</filtering>
</resource>
</resources>
</build>