Annotation-specified bean name 'customerMapper' for bean class [com.jiutong.zeus.old.mapper.zqp.CustomerMapper] conflicts with existing, non-compatible bean definition of same name and class

 追加:

部分报错不展示错误信息

 

 

 

直接不显示,突然中断。

 如果引用parent公共资源,本项目再添加一次,报错信息就出来,之后删除,报错信息仍会展示

试一试,项目里添加

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>

 

加上启动器,错误信息就展示了。 

 


 

 

 

今天开开心心 的启动服务,发现起不来了。

 

 

 

说明  conflicts with existing  你这有名字重复了。

 

例如:我这个文件就是 com.jiutong.zeus.old.mapper.zqp.CustomerMapper

 

CustomerMapper 这个名字重复了。

 

全局搜索一下,ctrl+shift+f 

 

 

果然有两个接口名字一模一样

 

解决:

在后面起个别名就行了。

 

 

posted @ 2021-11-03 11:23  未确定  阅读(926)  评论(0)    收藏  举报