【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]
    【Java】conflicts with existing, non-compatible bean definition of same name and class_第1张图片
  2. 原因
    新增的Controller在该项目中已经存在,重复了。如下所示:
    【Java】conflicts with existing, non-compatible bean definition of same name and class_第2张图片
  3. 解决
    (1)删掉重复的文件
    (2)然后刷新maven,清缓存clean
    【Java】conflicts with existing, non-compatible bean definition of same name and class_第3张图片

(3)重启项目

你可能感兴趣的:(java,开发语言)