Parameter 0 of method cacheManager in com.qh.redis.config.RedisConfig required a single bean, but 2 were found:
当项目中生成两个bean时,进行注入无法去选择注入的对象,这时只要在生成的对象方法上面添加
@Primary
Parameter 0 of method cacheManager in com.qh.redis.config.RedisConfig required a single bean, but 2 were found:
当项目中生成两个bean时,进行注入无法去选择注入的对象,这时只要在生成的对象方法上面添加
@Primary