错误信息
org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsin
g XML document from class path resource [spring/springmvc.xml]; nested exception is org.spr
ingframework.context.annotation.ConflictingBeanDefinitionException: Annotation-specified b
ean name 'deptController' for bean class [com.yzf.web.controller.system.dept.DeptControll
er] conflicts with existing, non-compatible bean definition of same name and class [com.yzf
.web.controller.dept.DeptController]
我的原因是直接移动了文件夹。
解决
- maven,在对应层执行clean,install操作(如果服务器在运行,我这里是tomcat,不能执行clean操作,要先关闭)
2.如果没用就rebuild一下工程就好了
软件是IDEA