*************************** APPLICATION FAILED TO START *************************** Description: Field redisTemplate in com.demo.service.UserServiceImpl required a bean of type 'org.springframework.data.redis.core.RedisTemplate' that could not be found. - Bean method 'stringRedisTemplate' in 'RedisAutoConfiguration' not loaded because @ConditionalOnMissingBean (types: org.springframework.data.redis.core.StringRedisTemplate; SearchStrategy: all) found beans of type 'org.springframework.data.redis.core.StringRedisTemplate' template Action: Consider revisiting the entries above or defining a bean of type 'org.springframework.data.redis.core.RedisTemplate' in your configuration.
解决方案:
将 RedisTemplate<String, List> redisTemplate
的注解 @Autowired
更换为 @Resource
再次运行,问题搞定。
你可能感兴趣的文章:
- Difference in @Resource and @Autowired
- Spring 注释 @Autowired 和@Resource 的区别
- @Resource与@Autowired用法区别
- 简析@Resource 和 @Autowired的区别