springboot部署错误
Caused by: org.springframework.beans.factory.BeanDefinitionStoreException: Failed to parse configuration class [com.example.djshichaoren.DjshichaorenApplication]; nested exception is org.springframework.context.annotation.ConflictingBeanDefinitionException: Annotation-specified bean name 'averagePriceService' for bean class [com.example.djshichaoren.service.database.AveragePriceService] conflicts with existing, non-compatible bean definition of same name and class [com.example.djshichaoren.service.AveragePriceService]
原因:在war包中有重复的bean
在开发中将com.example.djshichaoren.service.AveragePriceService移动到com.example.djshichaoren.service.database.AveragePriceService中,但是打包以后com.example.djshichaoren.service.AveragePriceService依然存在,于是出现了bean重复的问题。
解决:clean一下,然后再package
你可以在添加微信公众号:【务达】,这样可以第一时间接收文章。