Browse Source

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
pull/3077/head
Stephane Nicoll 11 years ago
parent
commit
91ce0abe48
  1. 4
      spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/redis/RedisAutoConfiguration.java

4
spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/redis/RedisAutoConfiguration.java

@ -1,5 +1,5 @@ @@ -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 { @@ -178,7 +178,7 @@ public class RedisAutoConfiguration {
@Bean
@ConditionalOnMissingBean(name = "redisTemplate")
public RedisOperations<Object, Object> redisTemplate(
public RedisTemplate<Object, Object> redisTemplate(
RedisConnectionFactory redisConnectionFactory)
throws UnknownHostException {
RedisTemplate<Object, Object> template = new RedisTemplate<Object, Object>();

Loading…
Cancel
Save