严重: Servlet.service() for servlet [springMVC] in context with path [/ssMVCm] threw exception [Request processing failed; nested exception is org.apache.ibatis.binding.BindingException: Type interface com.mapper.PersonMapper is not known to the MapperRegistry.] with root cause
org.apache.ibatis.binding.BindingException: Type interface com.mapper.PersonMapper is not known to the MapperRegistry.
找不到对应的mybatis配置文件
配置sqlSession的时候
<bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
<property name="dataSource" ref="dataSource" />
<property name="mapperLocations" value="classpath*:com/mapper/*.xml" />
</bean>
把对应的mybatis配置文件配置上就行!
应该很多原因能引发这个异常,只是,我刚好是这个错误!