All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.itxiaoer.commons.redis.RedisOperationsConfiguration Maven / Gradle / Ivy

There is a newer version: 2.3.4
Show newest version
package com.itxiaoer.commons.redis;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.redis.core.*;

/**
 * @author : liuyk
 */
@Configuration
@SuppressWarnings("all")
public class RedisOperationsConfiguration {

    @Bean
    public  HashOperations hashOperations(RedisTemplate redisTemplate) {
        return redisTemplate.opsForHash();
    }

    @Bean
    public  ValueOperations valueOperations(RedisTemplate redisTemplate) {
        return redisTemplate.opsForValue();
    }

    @Bean
    public  ListOperations listOperations(RedisTemplate redisTemplate) {
        return redisTemplate.opsForList();
    }

    @Bean
    public  SetOperations setOperations(RedisTemplate redisTemplate) {
        return redisTemplate.opsForSet();
    }

    @Bean
    public  ZSetOperations zSetOperations(RedisTemplate redisTemplate) {
        return redisTemplate.opsForZSet();
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy