Caused by: org.springframework.context.annotation.ConflictingBeanDefinitionException: Annotation-specified bean name 'redisService' for bean class [com.taotao.manager.service.redis.RedisService] conflicts with existing, non-compatible bean definition of same name and class [com.taotao.common.service.RedisService]
原因:org.springframework.context.annotation.ConflictingBeanDefinitionException:annotation为bean类[com.taotao.manager.service.redis.redisService]指定的bean名称“redisService”与现有的同名和类的不兼容bean定义[com.taotao.common.service.redisService]冲突
Spring 容器开启注解扫描后,在服务器启动时会扫描所有符合配置条件的包下的bean,创建并管理 bean 对象,出现上述错误主要是 Spring 容器里面的 bean 名字重复了。
原因是因为:
参考:https://blog.csdn.net/weixin_40307206/article/details/103548812