productmapper专题

Field productMapper in com.xxx.springcloud.service.ProductImpl required a bean of type

错误原图:  解决方案   将这段注解后面半段删除,即: 错误就解决了 可以正常运行

【报错】No qualifying bean of type ‘com...mapper.ProductMapper‘ available: expected at least 1 ......

【报错】: No qualifying bean of type ‘com.example.xxx.mapper.ProductMapper’ available: expected at least 1 bean which qualifies as autowire candidate. 方法一:在mapper里面加上@Mapper 方法二:在启动类里面加上mapper包的扫描路径