• ClassNotFoundException: redis.clients.jedis.util.SafeEncoder


    redis配置工厂报错

    Caused by: java.lang.NoClassDefFoundError: redis/clients/util/SafeEncoder
        at org.springframework.data.redis.connection.jedis.JedisConverters.lambda$static$1(JedisConverters.java:127)
        at org.springframework.data.redis.connection.jedis.JedisConverters.toBytes(JedisConverters.java:342)
        at org.springframework.data.redis.connection.jedis.JedisConverters.<clinit>(JedisConverters.java:134)
        at org.springframework.data.redis.connection.jedis.JedisConnectionFactory.<clinit>(JedisConnectionFactory.java:86)
        at com.dongriaf.framework.config.redis.RedisConfig.redisConnectionFactory(RedisConfig.java:80)
        at com.dongriaf.framework.config.redis.RedisConfig$$EnhancerBySpringCGLIB$$586d20c4.CGLIB$redisConnectionFactory$4(<generated>)
        at com.dongriaf.framework.config.redis.RedisConfig$$EnhancerBySpringCGLIB$$586d20c4$$FastClassBySpringCGLIB$$cc5a24ea.invoke(<generated>)
        at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:244)
        at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:363)
        at com.dongriaf.framework.config.redis.RedisConfig$$EnhancerBySpringCGLIB$$586d20c4.redisConnectionFactory(<generated>)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154)
        ... 113 common frames omitted
    Caused by: java.lang.ClassNotFoundException: redis.clients.util.SafeEncoder
        at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
        ... 128 common frames omitted

    这个类没有,我之前用的是

    <dependency>
    <groupId>redis.clients</groupId>
    <artifactId>jedis</artifactId>
    <version>2.9.0</version>
    </dependency>
    这个包中是没有redis/clients/util/SafeEncoder路径的。
    高版本中才会有

     我用的jedis版本是3.3的就好了

     
  • 相关阅读:
    ImageView 设置图片
    Android中GridView拖拽的效果【android进化三十六】
    Android 用户界面---拖放(Drag and Drop)(三)
    Android 用户界面---拖放(Drag and Drop)(二)
    Android 用户界面---拖放(Drag and Drop)(一)
    PHP中刷新输出缓冲
    php判断是否为json格式的方法
    php安全模式
    PHP json_encode() 函数介绍
    PHP mysql_real_escape_string() 函数防SQL注入
  • 原文地址:https://www.cnblogs.com/renjianjun/p/13611140.html
Copyright © 2020-2023  润新知