问题:springboot整合RedisTemplate时启动报错找到两个bean
报错内容
***************************
APPLICATION FAILED TO START
***************************
Description:
Field redistemplate in com.*** required a single bean, but 2 were found:
- redisTemplate: defined by method ‘redisTemplate’ in class path resource [org/springframework/boot/autoconfigure/data/redis/RedisAutoConfiguration.class]
- stringRedisTemplate: defined by method ‘stringRedisTemplate’ in class path resource [org/springframework/boot/autoconfigure/data/redis/RedisAutoConfiguration.class]
Action:
Consider marking one of the beans as @Primary, updating the consumer to accept multiple beans, or using @Qualifier to identify the bean that should be consumed
依赖
<dependency>
<groupId>org.springframework.boot</groupId&