报错信息:No qualifying bean of type ‘com.atguigu.crud.dao.DepartmentMapper’ available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
错误原因:
<!--配置扫描器,将mybatis接口的实现加入到IOC容器中-->
<bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
<!--扫描所有dao接口的实现,加入到ioc容器中-->
<property name="basePackage" value="com.atguigu.dao"/>
</bean>
这里的 value地址写错了