Could not autowire. No beans of ‘BookService‘ type found问题

按照文章
https://blog.csdn.net/baidu_39298625/article/details/98102453
配置到test这步时
在这里插入图片描述
出现 Could not autowire. No beans of ‘BookService’ type found
网上有很多解决办法,但是没一个适用,搜索了近一个半小时
发现问题是
在这里插入图片描述
Application的位置要在最外面
在这里插入图片描述
修改完目录后记得修改MapperScan的路径 这里又卡了有一会


版权声明:本文为qq_34182649原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。