在抽取的公共service中用泛型引用mapper,如下:
@Resource
protected M mapper;
启动项目时报错:
Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.NoUniqueBeanDefinitionException: No qualifying bean of type '?' available: expected single matching bean but found 3: pasMenuServ
瞎折腾一会,改成下面这个样子:
@Autowired
protected M mapper;
通了!!!