List of usage examples for org.springframework.data.redis.core RedisTemplate setBeanClassLoader
@Override public void setBeanClassLoader(ClassLoader classLoader)
From source file:org.springframework.session.data.redis.config.annotation.web.http.RedisHttpSessionConfiguration.java
private RedisTemplate<Object, Object> createRedisTemplate() { RedisTemplate<Object, Object> redisTemplate = new RedisTemplate<>(); redisTemplate.setKeySerializer(new StringRedisSerializer()); redisTemplate.setHashKeySerializer(new StringRedisSerializer()); if (this.defaultRedisSerializer != null) { redisTemplate.setDefaultSerializer(this.defaultRedisSerializer); }/*from w w w.j av a 2s. c o m*/ redisTemplate.setConnectionFactory(this.redisConnectionFactory); redisTemplate.setBeanClassLoader(this.classLoader); redisTemplate.afterPropertiesSet(); return redisTemplate; }