报错:

Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'org.springframework.data.redis.core.RedisTemplate<java.io.Serializable, java.io.Serializable>' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}

之前是,

@Autowired
private RedisTemplate<String, Object> redisTemplate;

 

改成

@Resource
private RedisTemplate<String, Object> redisTemplate;

 

解决。

 

相关文章:

  • 2022-12-23
  • 2021-05-27
  • 2021-12-20
  • 2021-06-19
  • 2022-12-23
  • 2021-06-01
  • 2022-12-23
  • 2021-08-03
猜你喜欢
  • 2021-07-29
  • 2021-12-08
  • 2022-12-23
  • 2021-03-31
  • 2021-09-27
  • 2022-12-23
  • 2021-05-31
相关资源
相似解决方案