Spring-boot redis依存をインポートしてError creating bean with name‘redisConnectionFactory’とエラーを報告


Spring-bootインポートredis依存後エラー

     org.springframework.boot
     spring-boot-starter-data-redis

エラーメッセージ: 
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;
commons-pool 2に依存する必要がある
 
     org.apache.commons
     commons-pool2
 

次のレプリケーションは既知です.
LettuceとJedisの位置付けはすべてRedisのclientなので、もちろんredis serverに直接接続することができます.
Jedisは実装上は直接接続されたredis serverであり、マルチスレッド環境で非スレッドが安全である場合、この場合は接続プールのみを使用してJedisインスタンスごとに物理接続を追加する
Lettuceの接続はNettyに基づいており、接続インスタンス(StatefulRedisConnection)は複数のスレッド間で同時アクセス可能であり、StatefulRedisConnectionはスレッドが安全であるべきであるため、1つの接続インスタンス(StatefulRedisConnection)はマルチスレッド環境での同時アクセスを満たすことができ、もちろんこれも伸縮可能な設計である.1つの接続インスタンスが不足している場合は、必要に応じて接続インスタンスを追加することもできます.
作者:Vitoリンク:https://www.zhihu.com/question/53124685/answer/354431529 出典:著作権は作者の所有であることを知っている.商業転載は著者に連絡して許可を得てください.非商業転載は出典を明記してください.
参照資料:https://www.cnblogs.com/verlout/p/10618019.html