java修改项目启动名_idea中的ssm项目,修改了包名后,项目就启动不起来了?
org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from class path resource [mvc-dispatcher.xml]; nested exception is org.springframework.context
org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from class path resource [mvc-dispatcher.xml]; nested exception is org.springframework.context.annotation.ConflictingBeanDefinitionException: Annotation-specified bean name 'fileController' for bean class [com.sw.controller.FileController] conflicts with existing, non-compatible bean definition of same name and class [com.cm.controller.FileController]
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:414)
报名从com.cm改成了com.sw
,所以并不存在`
com.cm.controller.FileController
回答
1、 bean 重复,删掉一个就好了。
com.sw.controller.FileController
com.cm.controller.FileController
2、或者加个别名
@RestController(“xxxController”)
@RequestMapping(“common”)
public class CommonController {
更多推荐




所有评论(0)