Parameter 0 of method redisTemplate in

时间:2025-03-20 11:02:26

目录

错误描述

问题解决


错误描述

错误如下
***************************
APPLICATION FAILED TO START
***************************

Description:

Parameter 0 of method redisTemplate in  required a bean of type '' that could not be found.

The following candidates were found but could not be injected:
	- Bean method 'redisConnectionFactory' in 'JedisConnectionConfiguration' not loaded because @ConditionalOnClass did not find required classes '.', ''
	- Bean method 'redisConnectionFactory' in 'LettuceConnectionConfiguration' not loaded because @ConditionalOnClass did not find required class ''


Action:

Consider revisiting the entries above or defining a bean of type '' in your configuration.

问题解决

这是由于没有引入redis配置文件而导致的;只需要添加相关依赖就可以 了。

<dependency>
    <groupId></groupId>
    <artifactId>spring-boot-starter-data-redis</artifactId>
</dependency>