Commit 91ce0abe authored by Stephane Nicoll's avatar Stephane Nicoll

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
parent 6ea27024
/* /*
* 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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with 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 @Bean
@ConditionalOnMissingBean(name = "redisTemplate") @ConditionalOnMissingBean(name = "redisTemplate")
public RedisOperations<Object, Object> redisTemplate( public RedisTemplate<Object, Object> redisTemplate(
RedisConnectionFactory redisConnectionFactory) RedisConnectionFactory redisConnectionFactory)
throws UnknownHostException { throws UnknownHostException {
RedisTemplate<Object, Object> template = new RedisTemplate<Object, Object>(); RedisTemplate<Object, Object> template = new RedisTemplate<Object, Object>();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment