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注解

三、解决方案:去除其中一个即可,我这里去除的是springboot启动配置的@MapperScan注解

猜你喜欢

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