无法使Redis连接与旧版Spring Boot应用程序一起使用

时间:2018-07-11 20:42:55

标签: java spring spring-boot redis

项目结构-

app.java位于模块A中,该模块依赖于模块B。我已添加了与模块B内的redis集成相对应的所有文件-实体,存储库等。

我使用这些Maven依赖项进行了两次尝试-

  • 使用spring-boot-starter-data-redis(这对我来说是一个独立项目)。

    • spring-data-redis + jedis

#1。 spring-boot-starter-data-redis

<dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-data-redis</artifactId>
        </dependency>

在应用程序启动期间收到此错误-

2018-07-11 15:20:02,187 39410 [main] WARN  o.s.b.c.e.AnnotationConfigEmbeddedWebApplicationContext [AbstractApplicationContext.java:550] - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'customerRepositoryImpl' defined in file [D:\Sandeepan\citrus\codebase\prepaid\prepaid-internal\manager\service\target\classes\com\citruspay\prepaid\internal\manager\service\redis\CustomerRepositoryImpl.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'redisTemplate' defined in class path resource [com/citruspay/prepaid/internal/manager/service/redis/RedisConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.data.redis.core.RedisTemplate]: Factory method 'redisTemplate' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jedisConnectionFactory' defined in class path resource [com/citruspay/prepaid/internal/manager/service/redis/RedisConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.data.redis.connection.jedis.JedisConnectionFactory]: Factory method 'jedisConnectionFactory' threw exception; nested exception is java.lang.VerifyError: Bad type on operand stack
Exception Details:
  Location:
    org/springframework/data/redis/connection/jedis/JedisConnectionFactory.createCluster()Lredis/clients/jedis/JedisCluster; @9: invokevirtual
  Reason:
    Type 'redis/clients/jedis/JedisPoolConfig' (current frame, stack[2]) is not assignable to 'org/apache/commons/pool2/impl/GenericObjectPoolConfig'
  Current Frame:
    bci: @9
    flags: { }
    locals: { 'org/springframework/data/redis/connection/jedis/JedisConnectionFactory' }
    stack: { 'org/springframework/data/redis/connection/jedis/JedisConnectionFactory', 'org/springframework/data/redis/connection/RedisClusterConfiguration', 'redis/clients/jedis/JedisPoolConfig' }
  Bytecode:
    0x0000000: 2a2a b400 122a b400 0bb6 0038 4c2a bb00
    0x0000010: 3959 bb00 3a59 2bb7 003b bb00 3c59 2bb7
    0x0000020: 003d b200 3eb7 003f b500 402b b0       

2018-07-11 15:20:02,207 39430 [main] INFO  o.s.o.j.LocalContainerEntityManagerFactoryBean [AbstractEntityManagerFactoryBean.java:548] - Closing JPA EntityManagerFactory for persistence unit 'mysqlPU'
2018-07-11 15:20:02,215 39438 [main] WARN  o.s.boot.SpringApplication [SpringApplicationRunListeners.java:91] - Error handling failed (Error creating bean with name 'delegatingApplicationListener' defined in class path resource [org/springframework/security/config/annotation/web/configuration/WebSecurityConfiguration.class]: BeanPostProcessor before instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration': Initialization of bean failed; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'org.springframework.context.annotation.ConfigurationClassPostProcessor.importRegistry' available)
2018-07-11 15:20:02,231 39454 [main] ERROR o.s.boot.SpringApplication [SpringApplication.java:815] - Application startup failed
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'customerRepositoryImpl' defined in file [D:\Sandeepan\citrus\codebase\prepaid\prepaid-internal\manager\service\target\classes\com\citruspay\prepaid\internal\manager\service\redis\CustomerRepositoryImpl.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'redisTemplate' defined in class path resource [com/citruspay/prepaid/internal/manager/service/redis/RedisConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.data.redis.core.RedisTemplate]: Factory method 'redisTemplate' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jedisConnectionFactory' defined in class path resource [com/citruspay/prepaid/internal/manager/service/redis/RedisConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.data.redis.connection.jedis.JedisConnectionFactory]: Factory method 'jedisConnectionFactory' threw exception; nested exception is java.lang.VerifyError: Bad type on operand stack
Exception Details:
  Location:
    org/springframework/data/redis/connection/jedis/JedisConnectionFactory.createCluster()Lredis/clients/jedis/JedisCluster; @9: invokevirtual
  Reason:
    Type 'redis/clients/jedis/JedisPoolConfig' (current frame, stack[2]) is not assignable to 'org/apache/commons/pool2/impl/GenericObjectPoolConfig'
  Current Frame:
    bci: @9
    flags: { }
    locals: { 'org/springframework/data/redis/connection/jedis/JedisConnectionFactory' }
    stack: { 'org/springframework/data/redis/connection/jedis/JedisConnectionFactory', 'org/springframework/data/redis/connection/RedisClusterConfiguration', 'redis/clients/jedis/JedisPoolConfig' }
  Bytecode:
    0x0000000: 2a2a b400 122a b400 0bb6 0038 4c2a bb00
    0x0000010: 3959 bb00 3a59 2bb7 003b bb00 3c59 2bb7
    0x0000020: 003d b200 3eb7 003f b500 402b b0       

    at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:749)
    at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:189)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1193)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1095)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:513)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:761)
    at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:866)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:542)
    at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122)
    at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:737)
    at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:370)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:314)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1162)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1151)
    at com.citruspay.prepaid.internal.app.App.main(App.java:39)
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'redisTemplate' defined in class path resource [com/citruspay/prepaid/internal/manager/service/redis/RedisConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.data.redis.core.RedisTemplate]: Factory method 'redisTemplate' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jedisConnectionFactory' defined in class path resource [com/citruspay/prepaid/internal/manager/service/redis/RedisConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.data.redis.connection.jedis.JedisConnectionFactory]: Factory method 'jedisConnectionFactory' threw exception; nested exception is java.lang.VerifyError: Bad type on operand stack
Exception Details:
  Location:
    org/springframework/data/redis/connection/jedis/JedisConnectionFactory.createCluster()Lredis/clients/jedis/JedisCluster; @9: invokevirtual
  Reason:
    Type 'redis/clients/jedis/JedisPoolConfig' (current frame, stack[2]) is not assignable to 'org/apache/commons/pool2/impl/GenericObjectPoolConfig'
  Current Frame:
    bci: @9
    flags: { }
    locals: { 'org/springframework/data/redis/connection/jedis/JedisConnectionFactory' }
    stack: { 'org/springframework/data/redis/connection/jedis/JedisConnectionFactory', 'org/springframework/data/redis/connection/RedisClusterConfiguration', 'redis/clients/jedis/JedisPoolConfig' }
  Bytecode:
    0x0000000: 2a2a b400 122a b400 0bb6 0038 4c2a bb00
    0x0000010: 3959 bb00 3a59 2bb7 003b bb00 3c59 2bb7
    0x0000020: 003d b200 3eb7 003f b500 402b b0       

    at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:599)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1173)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1067)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:513)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
    at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:208)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1138)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1066)
    at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:835)
    at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:741)
    ... 19 common frames omitted
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.data.redis.core.RedisTemplate]: Factory method 'redisTemplate' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jedisConnectionFactory' defined in class path resource [com/citruspay/prepaid/internal/manager/service/redis/RedisConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.data.redis.connection.jedis.JedisConnectionFactory]: Factory method 'jedisConnectionFactory' threw exception; nested exception is java.lang.VerifyError: Bad type on operand stack
Exception Details:
  Location:
    org/springframework/data/redis/connection/jedis/JedisConnectionFactory.createCluster()Lredis/clients/jedis/JedisCluster; @9: invokevirtual
  Reason:
    Type 'redis/clients/jedis/JedisPoolConfig' (current frame, stack[2]) is not assignable to 'org/apache/commons/pool2/impl/GenericObjectPoolConfig'
  Current Frame:
    bci: @9
    flags: { }
    locals: { 'org/springframework/data/redis/connection/jedis/JedisConnectionFactory' }
    stack: { 'org/springframework/data/redis/connection/jedis/JedisConnectionFactory', 'org/springframework/data/redis/connection/RedisClusterConfiguration', 'redis/clients/jedis/JedisPoolConfig' }
  Bytecode:
    0x0000000: 2a2a b400 122a b400 0bb6 0038 4c2a bb00
    0x0000010: 3959 bb00 3a59 2bb7 003b bb00 3c59 2bb7
    0x0000020: 003d b200 3eb7 003f b500 402b b0       

    at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:189)
    at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:588)
    ... 32 common frames omitted
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jedisConnectionFactory' defined in class path resource [com/citruspay/prepaid/internal/manager/service/redis/RedisConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.data.redis.connection.jedis.JedisConnectionFactory]: Factory method 'jedisConnectionFactory' threw exception; nested exception is java.lang.VerifyError: Bad type on operand stack
Exception Details:
  Location:
    org/springframework/data/redis/connection/jedis/JedisConnectionFactory.createCluster()Lredis/clients/jedis/JedisCluster; @9: invokevirtual
  Reason:
    Type 'redis/clients/jedis/JedisPoolConfig' (current frame, stack[2]) is not assignable to 'org/apache/commons/pool2/impl/GenericObjectPoolConfig'
  Current Frame:
    bci: @9
    flags: { }
    locals: { 'org/springframework/data/redis/connection/jedis/JedisConnectionFactory' }
    stack: { 'org/springframework/data/redis/connection/jedis/JedisConnectionFactory', 'org/springframework/data/redis/connection/RedisClusterConfiguration', 'redis/clients/jedis/JedisPoolConfig' }
  Bytecode:
    0x0000000: 2a2a b400 122a b400 0bb6 0038 4c2a bb00
    0x0000010: 3959 bb00 3a59 2bb7 003b bb00 3c59 2bb7
    0x0000020: 003d b200 3eb7 003f b500 402b b0       

    at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:599)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1173)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1067)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:513)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
    at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.obtainBeanInstanceFromFactory(ConfigurationClassEnhancer.java:389)
    at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:361)
    at com.citruspay.prepaid.internal.manager.service.redis.RedisConfig$$EnhancerBySpringCGLIB$$abee5011.jedisConnectionFactory(<generated>)
    at com.citruspay.prepaid.internal.manager.service.redis.RedisConfig.redisTemplate(RedisConfig.java:25)
    at com.citruspay.prepaid.internal.manager.service.redis.RedisConfig$$EnhancerBySpringCGLIB$$abee5011.CGLIB$redisTemplate$0(<generated>)
    at com.citruspay.prepaid.internal.manager.service.redis.RedisConfig$$EnhancerBySpringCGLIB$$abee5011$$FastClassBySpringCGLIB$$4bc287c2.invoke(<generated>)
    at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228)
    at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:358)
    at com.citruspay.prepaid.internal.manager.service.redis.RedisConfig$$EnhancerBySpringCGLIB$$abee5011.redisTemplate(<generated>)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:162)
    ... 33 common frames omitted
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.data.redis.connection.jedis.JedisConnectionFactory]: Factory method 'jedisConnectionFactory' threw exception; nested exception is java.lang.VerifyError: Bad type on operand stack
Exception Details:
  Location:
    org/springframework/data/redis/connection/jedis/JedisConnectionFactory.createCluster()Lredis/clients/jedis/JedisCluster; @9: invokevirtual
  Reason:
    Type 'redis/clients/jedis/JedisPoolConfig' (current frame, stack[2]) is not assignable to 'org/apache/commons/pool2/impl/GenericObjectPoolConfig'
  Current Frame:
    bci: @9
    flags: { }
    locals: { 'org/springframework/data/redis/connection/jedis/JedisConnectionFactory' }
    stack: { 'org/springframework/data/redis/connection/jedis/JedisConnectionFactory', 'org/springframework/data/redis/connection/RedisClusterConfiguration', 'redis/clients/jedis/JedisPoolConfig' }
  Bytecode:
    0x0000000: 2a2a b400 122a b400 0bb6 0038 4c2a bb00
    0x0000010: 3959 bb00 3a59 2bb7 003b bb00 3c59 2bb7
    0x0000020: 003d b200 3eb7 003f b500 402b b0       

    at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:189)
    at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:588)
    ... 55 common frames omitted
Caused by: java.lang.VerifyError: Bad type on operand stack
Exception Details:
  Location:
    org/springframework/data/redis/connection/jedis/JedisConnectionFactory.createCluster()Lredis/clients/jedis/JedisCluster; @9: invokevirtual
  Reason:
    Type 'redis/clients/jedis/JedisPoolConfig' (current frame, stack[2]) is not assignable to 'org/apache/commons/pool2/impl/GenericObjectPoolConfig'
  Current Frame:
    bci: @9
    flags: { }
    locals: { 'org/springframework/data/redis/connection/jedis/JedisConnectionFactory' }
    stack: { 'org/springframework/data/redis/connection/jedis/JedisConnectionFactory', 'org/springframework/data/redis/connection/RedisClusterConfiguration', 'redis/clients/jedis/JedisPoolConfig' }
  Bytecode:
    0x0000000: 2a2a b400 122a b400 0bb6 0038 4c2a bb00
    0x0000010: 3959 bb00 3a59 2bb7 003b bb00 3c59 2bb7
    0x0000020: 003d b200 3eb7 003f b500 402b b0       

    at com.citruspay.prepaid.internal.manager.service.redis.RedisConfig.jedisConnectionFactory(RedisConfig.java:16)
    at com.citruspay.prepaid.internal.manager.service.redis.RedisConfig$$EnhancerBySpringCGLIB$$abee5011.CGLIB$jedisConnectionFactory$1(<generated>)
    at com.citruspay.prepaid.internal.manager.service.redis.RedisConfig$$EnhancerBySpringCGLIB$$abee5011$$FastClassBySpringCGLIB$$4bc287c2.invoke(<generated>)
    at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228)
    at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:358)
    at com.citruspay.prepaid.internal.manager.service.redis.RedisConfig$$EnhancerBySpringCGLIB$$abee5011.jedisConnectionFactory(<generated>)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:162)
    ... 56 common frames omitted

遵循了本教程- http://javasampleapproach.com/spring-framework/spring-data/spring-data-redis-example-spring-boot-redis-example#1_Maven_Dependency

#2。 spring-data-redis + jedis依赖-

 <dependency>
            <groupId>org.springframework.data</groupId>
            <artifactId>spring-data-redis</artifactId>
            <version>2.0.8.RELEASE</version>
        </dependency>
        <dependency>
            <groupId>redis.clients</groupId>
            <artifactId>jedis</artifactId>
            <version>2.6.2</version>
        </dependency>

具有上述依赖性的错误-

2018-07-11 19:14:14,802 31872 [main] ERROR o.s.boot.SpringApplication [SpringApplication.java:815] - Application startup failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'redisUtil': Failed to introspect bean class [com.citruspay.common.util.RedisUtil] for lookup method metadata: could not find class that it depends on; nested exception is java.lang.NoClassDefFoundError: Jedis
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.determineCandidateConstructors(AutowiredAnnotationBeanPostProcessor.java:269)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.determineConstructorsFromBeanPostProcessors(AbstractAutowireCapableBeanFactory.java:1118)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1091)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:513)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:761)
    at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:866)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:542)
    at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122)
    at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:737)
    at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:370)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:314)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1162)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1151)
    at com.citruspay.prepaid.internal.app.App.main(App.java:39)
Caused by: java.lang.NoClassDefFoundError: Jedis
    at java.lang.Class.getDeclaredMethods0(Native Method)
    at java.lang.Class.privateGetDeclaredMethods(Unknown Source)
    at java.lang.Class.getDeclaredMethods(Unknown Source)
    at org.springframework.util.ReflectionUtils.getDeclaredMethods(ReflectionUtils.java:613)
    at org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:524)
    at org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:510)
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.determineCandidateConstructors(AutowiredAnnotationBeanPostProcessor.java:247)
    ... 18 common frames omitted
Caused by: java.lang.ClassNotFoundException: Jedis
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    ... 25 common frames omitted

https://stackoverflow.com/a/31023359/351903

所述,已确保适当的版本兼容性

0 个答案:

没有答案