欢迎光临
我们一直在努力

Springboot集成redis报错:java.lang.NoClassDefFoundError: org/apache/commons/pool2/impl/GenericObjectPoolConfig

Springboot集成redis报错信息如下:

Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'redisConnectionFactory' defined in class path resource [org/springframework/boot/autoconfigure/data/redis/LettuceConnectionConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory]: Factory method 'redisConnectionFactory' threw exception; nested exception is java.lang.NoClassDefFoundError: org/apache/commons/pool2/impl/GenericObjectPoolConfig

原因:缺少依赖。

<dependency>
    <groupId>org.apache.commons</groupId>
    <artifactId>commons-pool2</artifactId>
</dependency>
赞(0)
未经允许不得转载:Ddmit » Springboot集成redis报错:java.lang.NoClassDefFoundError: org/apache/commons/pool2/impl/GenericObjectPoolConfig

评论 抢沙发

登录

找回密码

注册