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

其实在报错信息上就能看出来问题是什么,但是因为现在文档少,不容易找到解决方案。特此记录
springboot 启动报错 Field roleMapper in ‘’ required a bean of type '' that could not be found._第1张图片
意思是扫描不到mapper层,我们需要在Application.java这个启动文件上加一个注解告诉springboot我们的mapper位置在哪

@MapperScan("mapper文件位置")

springboot 启动报错 Field roleMapper in ‘’ required a bean of type '' that could not be found._第2张图片

你可能感兴趣的:(java)