日常问题记录(二)

1、Mybatis或Mybatis Plus创建重复Mapper问题:Skipping MapperFactoryBean with name 'XXX' and 'xx.xx..' mapperInterface. Bean already defined with the same name!,如图

 原因分析:提示很明显,说明是重复往容器里注册了名称一样的bean。检查发现,springboot启动配置和Mybatis Plus配置都加了@MapperScan注解

 解决方案:去除其中一个即可。

猜你喜欢

转载自www.cnblogs.com/54hsh/p/12641469.html