若只配置下面的依赖:
1 2 3 4
| <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-redis</artifactId> </dependency>
|
则为出现:
Unsatisfied dependency expressed through field ‘redisTemplate‘;
这个不对,还必须加上 commons-pool2,修改以后是
1 2 3 4 5 6 7 8 9
| <dependency> <groupId>org.apache.commons</groupId> <artifactId>commons-pool2</artifactId> </dependency>
<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-redis</artifactId> </dependency>
|
本文作者:jujimeizuo
本文地址: https://blog.jujimeizuo.cn/2021/11/30/redisq/
本博客所有文章除特别声明外,均采用 CC BY-SA 3.0 协议。转载请注明出处!