异常:
springframework.beans.factory.BeanDefinitionStoreException: Failed to
parse configuration class [com.itcodai.course01.Course01Application];
nested exception is
org.springframework.context.annotation.ConflictingBeanDefinitionException:Annotation-specified bean name ‘testController’ for bean class
[com.itcodai.course01.Swagger2Test.TestController] conflicts with
existing, non-compatible bean definition of same name and class
[com.itcodai.course01.MVCTest.TestController]
情景:
项目新增一个类之后,项目就报错了。但出错比较容易找。
原因:
类重命名问题。然后对照我的项目中的注解,果然是新增的TestController类重名了。
版权声明:本文为lost__cat原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。