title: Configuring Jedis on Spring boot 2
body: <p>I am trying to migrate from spring boot 1.5.5 to spring boot 2. I am getting the following for JedisPool</p>
  
  <pre><code>Parameter 0 of method getJedisPool in com.company.spring.config.ApplicationConfig required a bean of type 'org.springframework.data.redis.connection.jedis.JedisConnectionFactory' that could not be found.
          - Bean method 'redisConnectionFactory' in 'JedisConnectionConfiguration' not loaded because @ConditionalOnMissingBean (types: org.springframework.data.redis.connection.RedisConnectionFactory; SearchStrategy: all) found beans of type 'org.springframework.data.redis.connection.RedisConnectionFactory' redisConnectionFactory
  </code></pre>
  
  <p>I am trying to configure using Jedis and not lettuce. I have ignored the lettuce module when importing the spring-starter-redis-data as suggested in the docs.</p>
  
  <p>The below is the code that is trying to initialize the JedisPool.</p>
  
  <pre><code>@Bean
  public JedisPool getJedisPool(JedisConnectionFactory jedisConnectionFactory) {
      String host = jedisConnectionFactory.getHostName();
      int port = jedisConnectionFactory.getPort();
      String password = StringUtils.isEmpty(jedisConnectionFactory.getPassword()) ? null : jedisConnectionFactory.getPassword();
      int timeout = jedisConnectionFactory.getTimeout();
      GenericObjectPoolConfig poolConfig = jedisConnectionFactory.getPoolConfig();
      log.info("Starting Redis with Host:{}, Port:{}, Timeout:{}, PoolConfig:{}", host, port, timeout, poolConfig);
      return new JedisPool(poolConfig, host, port, timeout, password);
  }
  </code></pre>