Simplify code

See gh-27838
pull/27660/head
Yanming Zhou 3 years ago committed by Stephane Nicoll
parent b9197a33b1
commit 168688ef49

@ -62,9 +62,7 @@ public class RedisAutoConfiguration {
@ConditionalOnMissingBean
@ConditionalOnSingleCandidate(RedisConnectionFactory.class)
public StringRedisTemplate stringRedisTemplate(RedisConnectionFactory redisConnectionFactory) {
StringRedisTemplate template = new StringRedisTemplate();
template.setConnectionFactory(redisConnectionFactory);
return template;
return new StringRedisTemplate(redisConnectionFactory);
}
}

Loading…
Cancel
Save