redis.clients.util.Pool; 无法找到
时间: 2023-10-04 07:07:08 浏览: 51
这个错误通常是由于缺少Redis Java客户端的依赖库引起的。你可以检查你的项目中是否有redis.clients.util.Pool这个类的依赖库,如果没有,可以尝试在pom.xml文件中添加以下Maven依赖库:
```
<dependency>
<groupId>redis.clients</groupId>
<artifactId>jedis</artifactId>
<version>3.0.1</version>
</dependency>
```
如果你不是使用Maven构建的项目,可以手动下载Jedis库并添加到你的项目中。
如果你仍然遇到问题,可能是由于你的项目中有冲突的依赖库或版本不兼容引起的。你可以尝试使用Maven Dependency Plugin的dependency:tree命令来查看你的项目依赖树,并检查是否有冲突的依赖库。
相关问题
*************************** APPLICATION FAILED TO START *************************** Description: Field jedisPool in com.mt.mtip.preclient.point.data.DataClient required a bean of type 'redis.clients.jedis.util.Pool' 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 'redis.clients.jedis.util.Pool' in your configuration.
这是一个Spring Boot应用程序启动失败的错误提示,原因是在DataClient类中需要一个名为jedisPool的类型为redis.clients.jedis.util.Pool的Bean,但是在配置中找不到这个Bean。需要你在配置文件中定义一个名为jedisPool的Bean,并且类型为redis.clients.jedis.util.Pool,这样就可以解决错误了。
jedis 哪个版本,Pool 是放到redis.clients.util 下
在Jedis 3.x版本中,redis.clients.util.Pool类被放到了这个包中,因此你需要使用Jedis 3.x版本才能解决这个问题。你可以在pom.xml文件中添加以下Maven依赖库来使用Jedis 3.x版本:
```
<dependency>
<groupId>redis.clients</groupId>
<artifactId>jedis</artifactId>
<version>3.0.1</version>
</dependency>
```
如果你不是使用Maven构建的项目,可以手动下载Jedis库并添加到你的项目中。
注意:如果你使用的是较早版本的Jedis,Pool类可能被放在不同的包中,因此你需要检查你使用的Jedis版本中Pool类的包名。
相关推荐
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![-](https://csdnimg.cn/download_wenku/file_type_column_c1.png)
![-](https://csdnimg.cn/download_wenku/file_type_column_c1.png)
![-](https://csdnimg.cn/download_wenku/file_type_column_c1.png)
![-](https://csdnimg.cn/download_wenku/file_type_column_c1.png)
![-](https://csdnimg.cn/download_wenku/file_type_column_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)