I am encountering a ConflictingBeanDefiitionException saying org.company.app.core.controller.web.EquipmentController conflicts with org.company.app.core.controller.EquipmentController. The only problem is there is no org.company.app.core.controller.EquipmentController. It used to be there, I moved it to the package org.company.app.core.controller.web.
I don't understand why this is happening. Is this a weird Intellij thing or what?
Caused by: org.springframework.context.annotation.ConflictingBeanDefinitionException: Annotation-specified bean name 'equipmentController' for bean class [org.company.app.core.controller.web.EquipmentController] conflicts with existing, non-compatible bean definition of same name and class [org.company.app.core.controller.EquipmentController]
at org.springframework.context.annotation.ClassPathBeanDefinitionScanner.checkCandidate(ClassPathBeanDefinitionScanner.java:320)
at org.springframework.context.annotation.ClassPathBeanDefinitionScanner.doScan(ClassPathBeanDefinitionScanner.java:259)
at org.springframework.context.annotation.ComponentScanAnnotationParser.parse(ComponentScanAnnotationParser.java:140)
at org.springframework.context.annotation.ConfigurationClassParser.doProcessConfigurationClass(ConfigurationClassParser.java:262)
at org.springframework.context.annotation.ConfigurationClassParser.processConfigurationClass(ConfigurationClassParser.java:226)
at org.springframework.context.annotation.ConfigurationClassParser.processImports(ConfigurationClassParser.java:480)
... 59 more
mvn clean package
Worked for me . It attempts to clean the files and directories generated by Maven during its old build.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With