redis 使用的时候这样都正常,
@Autowired
private RedisTemplate<String, String> strRedisTemplate;
@Autowired
private RedisTemplate<String, Serializable> serializableRedisTemplate;
这样使用报错,
@Autowired
private RedisTemplate<String, Object> redisTemplate;
提示
Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'org.springframework.data.redis.core.RedisTemplate<java.lang.String, java.lang.Object>' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
at org.springframework.beans.factory.support.DefaultListableBeanFactory.raiseNoMatchingBeanFound(DefaultListableBeanFactory.java:1777)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(Defau