问题:
由于把类移到了新的包路径下面
把代码推送到gitlab仓库,触发jenkins构建war包生成的镜像,创建的容器,容器启动报如下错误:Caused by: org.springframework.beans.factory.BeanDefinitionStoreException: Failed to parse configuration class [com.example.demo.DemoApplication]; nested exception is org.s
pringframework.context.annotation.ConflictingBeanDefinitionException: Annotation-specified bean name 'hello' for bean class [com.example.demo.business.Hello] conflicts with existin
g, non-compatible bean definition of same name and class [com.example.demo.Hello]
截图:
根因:jenkins缓存导致
方案:清理工作空间即可!