From 91ce0abe48c7670f567f7b6584883d56fd3306cf Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Mon, 1 Jun 2015 11:48:25 +0200 Subject: [PATCH] Fix Redis cache auto-configuration Add an explicit link to the `RedisAutoConfiguration` to make sure it is applied before the cache counter-part. Request the general `redisTemplate` so that non String-values can be handled by default as well. See gh-2633 --- .../boot/autoconfigure/redis/RedisAutoConfiguration.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/redis/RedisAutoConfiguration.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/redis/RedisAutoConfiguration.java index 2469a61c9f9..83a1cdbe11c 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/redis/RedisAutoConfiguration.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/redis/RedisAutoConfiguration.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2014 the original author or authors. + * Copyright 2012-2015 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -178,7 +178,7 @@ public class RedisAutoConfiguration { @Bean @ConditionalOnMissingBean(name = "redisTemplate") - public RedisOperations redisTemplate( + public RedisTemplate redisTemplate( RedisConnectionFactory redisConnectionFactory) throws UnknownHostException { RedisTemplate template = new RedisTemplate();