spring boot 配置redis 一个巨坑 报错 Unsatisfied dependency expressed through field ‘redisTemplate‘;
意思就是Bean在创建类的时候报错了一般我们配置reids时候是<dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-data-redis</artifactId></dependency>这个不对,还必须加
·
意思就是Bean 在创建类的时候报错了
一般我们配置reids时候是
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-redis</artifactId>
</dependency>
这个不对,还必须加上 commons-pool2,不然就会包这个错
修改以后是
<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>
更多推荐
已为社区贡献1条内容
所有评论(0)