![cover](https://img-blog.csdnimg.cn/026251c5aba443b39c58af1795cfd993.png)
【SpringBooot报错】eld redisTemplate in com.buba.utils.RedisUtils required a bean of type
【SpringBooot报错】eld redisTemplate in com.buba.utils.RedisUtils required a bean of type
·
报错如下:
2022-07-19 14:10:36.111 ERROR 16164 --- [ restartedMain] o.s.b.d.LoggingFailureAnalysisReporter :
***************************
APPLICATION FAILED TO START
***************************
Description:
Field redisTemplate in com.buba.utils.RedisUtils required a bean of type 'org.springframework.data.redis.core.RedisTemplate' that could not be found.
The injection point has the following annotations:
- @org.springframework.beans.factory.annotation.Autowired(required=true)
Action:
Consider defining a bean of type 'org.springframework.data.redis.core.RedisTemplate' in your configuration.
Process finished with exit code 0
很有可能是这个@Autowired的问题
把他改成@Component问题就完美解决了
更多推荐
所有评论(0)