Spring Data Redis

来源:互联网 发布:数据对比分析ppt模板 编辑:程序博客网 时间:2024/06/14 05:35

Spring Data Redis – Spring集成Redis使用
官网:http://projects.spring.io/spring-data-redis/
项目地址:https://github.com/spring-projects/spring-data-redis

Spring Data Redis, part of the larger Spring Data family, provides easy configuration and access to Redis from Spring applications. It offers both low-level and high-level abstractions for interacting with the store, freeing the user from infrastructural concerns.
Spring Data Redis是Spring大家族的一部分,提供了在Spring应用中通过简单的配置访问Redis。Spring Data Redis提供了底层和高级两种抽象封装来和存储进行交互,使用户不用再关注底层。


Features

  • Connection package as low-level abstraction across multiple Redis drivers/connectors (Jedis and Lettuce. Support for JRedis and SRP is deprecated.)
    连接管理:针对多个Redis drivers/connectors,都提供了底层抽象封装(Jedis、Lettuce。支持JRedis,不赞成SRP)

  • Exception translation to Spring’s portable Data Access exception hierarchy for Redis driver exceptions
    异常转化:将Redis driver exceptions转化为Spring的轻便的数据访问异常

  • RedisTemplate that provides a high level abstraction for performing various Redis operations, exception translation and serialization support
    RedisTemplate:对执行各种Redis操作提供了底层的抽象封装,以及异常转化,并支持序列化

  • Pubsub support (such as a MessageListenerContainer for message-driven POJOs)
    支持订阅(MessageListenerContainer )

  • Redis Sentinel and Redis Cluster support
    支持Redis Sentinel 和 Redis Cluster

  • JDK, String, JSON and Spring Object/XML mapping serializers
    支持多种序列化,JDK, String, JSON and Spring Object/XML

  • JDK Collection implementations on top of Redis
    在Redis上熟练的使用JDK的集合

  • Atomic counter support classes
    原子计数器支持

  • Sorting and Pipelining functionality
    排序和管道功能

  • Dedicated support for SORT, SORT/GET pattern and returned bulk values

  • Redis implementation for Spring 3.1 cache abstraction
    在Spring 3.1缓存抽象封装中提供Redis实现

  • Automatic implementation of Repository interfaces including support for custom finder methods using @EnableRedisRepositories
    版本库接口的自动化实现,使用@EnableRedisRepositories注解

  • CDI support for repositories

原创粉丝点击