title: I do not know why this is happening. jedis Error creating bean with name 'jedisConnectionFactory'
body: <p>An error has been detected after running the application.
  I can not find any problems and I need help.</p>
  
  <p>The package structure consists of config and controller.</p>
  
  <p>spring-boot-starter-data-redis
  redis.clients jedis 3.0.1</p>
  
  <pre><code>package com.arthur.springbootredis.config;
  
  import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
  import org.springframework.context.annotation.Bean;
  import org.springframework.context.annotation.Configuration;
  import org.springframework.data.redis.RedisConnectionFailureException;
  import org.springframework.data.redis.connection.RedisStandaloneConfiguration;
  import org.springframework.data.redis.connection.jedis.JedisConnectionFactory;
  import org.springframework.data.redis.core.RedisTemplate;
  import org.springframework.data.redis.serializer.GenericToStringSerializer;
  
  @Configuration
  public class RedisConfig {
  
      @Bean
      JedisConnectionFactory jedisConnectionFactory() {
  
          JedisConnectionFactory jedisConnectionFactory = null;
  
          try {
              RedisStandaloneConfiguration redisStandaloneConfiguration = new RedisStandaloneConfiguration();
              redisStandaloneConfiguration.setDatabase(0);
              redisStandaloneConfiguration.setHostName("localhost");
              redisStandaloneConfiguration.setPort(6379);
  
              jedisConnectionFactory = new JedisConnectionFactory(redisStandaloneConfiguration);
  
              jedisConnectionFactory.getPoolConfig().setMaxTotal(50);
              jedisConnectionFactory.getPoolConfig().setMaxIdle(50);
          } catch (RedisConnectionFailureException e) {
              e.getMessage();
          }
  
          return jedisConnectionFactory;
      }
  
  
      @Bean
      @ConditionalOnMissingBean(name = "redisTemplate")
      public RedisTemplate&lt;String, Object&gt; redisTemplate() {
          final RedisTemplate&lt;String, Object&gt; template = new RedisTemplate&lt;String, Object&gt;();
          template.setConnectionFactory(jedisConnectionFactory());
          template.setValueSerializer(new GenericToStringSerializer&lt;Object&gt;(Object.class));
          template.setEnableTransactionSupport(true);
          return template;
      }
  }
  </code></pre>
  
  <hr>
  
  <p>Below is the error content</p>
  
  <p>org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jedisConnectionFactory' defined in class path resource [com/arthur/springbootredis/config/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.NoClassDefFoundError: redis/clients/util/SafeEncoder</p>
  
  <p>Thank you for reading.</p>