问题出现环境:
开发工具idea
dao层也添加@Mapper
启动类上也添加了@MapperScan
整个项目能启动,但是依赖注入就是报Could not autowire. No beans of 'StudentMapper' type found.
解决方法:

在使用IDEA进行开发时,遇到MyBatis依赖注入StudentMapper失败的问题,表现为Could not autowire. No beans of 'StudentMapper' type found错误。本文详细介绍了问题的环境及解决方案。
问题出现环境:
开发工具idea
dao层也添加@Mapper
启动类上也添加了@MapperScan
整个项目能启动,但是依赖注入就是报Could not autowire. No beans of 'StudentMapper' type found.
解决方法:

2万+
2355
11万+
9102