【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]
    insert image description here
  2. Cause
    The newly added Controller already exists in this project, so it is repeated. As follows:
    insert image description here
  3. Solution
    (1) delete duplicate files
    (2) then refresh maven, clear cache clean
    insert image description here

(3) Restart the project

Guess you like

Origin blog.csdn.net/weixin_47375144/article/details/131065993