【Java】conflicts with existing, non-compatible bean definition of same name and class

  1. 报错
    org.springframework.beans.factory.BeanDefinitionStoreException: Failed to parse configuration class [org.springblade.Application]; nested exception is org.springframework.context.annotation.ConflictingBeanDefinitionException: Annotation-specified bean name ‘archiveBorrowRelateController’ for bean class [org.springblade.modules.archiveToDo.controller.ArchiveBorrowRelateController] conflicts with existing, non-compatible bean definition of same name and class [org.springblade.modules.archiveAdvantage.controller.ArchiveBorrowRelateController]
    在这里插入图片描述
  2. 原因
    新增的Controller在该项目中已经存在,重复了。如下所示:
    在这里插入图片描述
  3. 解决
    (1)删掉重复的文件
    (2)然后刷新maven,清缓存clean
    在这里插入图片描述

(3)重启项目

猜你喜欢

转载自blog.csdn.net/weixin_47375144/article/details/131065993
今日推荐