Caused by: org.springframework.context.annotation.ConflictingBeanDefinitionException: Annotation-specified bean name ‘redissonConfiguration’ for bean class [com.sl.ms.work.config.RedissonConfiguration] conflicts with existing, non-compatible bean definition of same name and class [com.sl.ms.dispatch.config.RedissonConfiguration]
今天启动项目的时候发现了一个错误,原因是spring中有相同名称的类时,使用时没有明确指定bean名称,会抛出异常。
解决方法:在项目中查找重复的Bean名称,将部分重复的bean名称更改一下;更改原则:公共包下面的Bean保持原名称,自己模块下重复的Bean名称改为新的名称。