A component required a bean of type 'xxx’could not find

104 阅读1分钟

A component required a bean of type 'xxx’could not find

因为解决了,忘记截图之前的问题。 如果遇到了这个问题,首先看是mapper文件报错还是实体类文件报错,如果是mapper文件,在启动类那里上头加上注解:@MapperScan("com.xxx.mapper") //你的mapper文件夹路径

如果是实体类,那就在实体类上方加上@Configuration