Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'commonUtil': Unsatisfied dependency expressed through field 'redisUtil'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'redisUtil': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'redisTemplate' defined in class path resource [org/xyifp/common/redis/config/RedisTemplateConfig.class]: Unsatisfied dependency expressed through method 'getRedisTemplate' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jedisConnectionFactory' defined in class path resource [org/xyifp/common/redis/config/RedisConnectionConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.data.redis.connection.RedisConnectionFactory]: Factory method 'jedisConnectionFactory' threw exception; nested exception is java.lang.NoClassDefFoundError: org/bouncycastle/asn1/gm/GMNamedCurves
时间: 2024-02-04 10:22:01 浏览: 267
Caused by: java.lang.ClassNotFoundException: org.apache.commons.collections.Transformer异常
5星 · 资源好评率100%
这是一个 Spring 框架的错误,提示依赖注入失败。具体来说,是因为在 commonUtil 中的 redisUtil 字段注入失败,原因是 redisUtil 中依赖的 redisTemplate 注入失败,而 redisTemplate 又依赖于 jedisConnectionFactory,最终发现 jedisConnectionFactory 实例化失败,因为它的工厂方法 jedisConnectionFactory 抛出了一个 NoClassDefFoundError 异常,提示缺少 org.bouncycastle.asn1.gm.GMNamedCurves 类。
阅读全文