springboot 启动报错 Field roleMapper in ‘’ required a bean of type '' that could not be found.

版权声明:本文为博主原创文章,未经博主允许不得转载。转载请注明出处 https://blog.csdn.net/tutian2000/article/details/80609387

其实在报错信息上就能看出来问题是什么,但是因为现在文档少,不容易找到解决方案。特此记录
这里写图片描述
意思是扫描不到mapper层,我们需要在Application.java这个启动文件上加一个注解告诉springboot我们的mapper位置在哪

@MapperScan("mapper文件位置")

这里写图片描述

猜你喜欢

转载自blog.csdn.net/tutian2000/article/details/80609387