Preface 一些介绍
The Spring Data Redis project applies core Spring concepts to the development of solutions using a key-value style data store. We provide a "template" as a high-level abstraction for sending and receiving messages. You will notice similarities to the JDBC support in the Spring Framework.
- New Features
New and noteworthy in the latest releases.
1.1. New in Spring Data Redis 1.7 新功能
• Support for RedisCluster. 支持集群
• Support for Spring Data Repository abstractions (see Redis Repositories). 支持Repository 了
1.2. New in Spring Data Redis 1.6
• The Lettuce Redis driver switched from wg/lettuce to mp911de/lettuce. 支持lettuce redis 客户端 详细信息
• Support for ZRANGEBYLEX. 支持redis 的这个命令了
• Enhanced range operations for ZSET s including +inf / -inf. 对ZSET的增强
• Performance improvements in RedisCache now releasing connections earlier. 性能改进
• Generic Jackson2 RedisSerializer making use of Jackson’s polymorphic deserialization. 使用这个Jackson2序列
1.3. New in Spring Data Redis 1.5
• Add support for Redis HyperLogLog commands PFADD, PFCOUNT and PFMERGE. 支持了这些命令
• Configurable JavaType lookup for Jackson based RedisSerializers. 基于Jackson的Redis序列化程序的可配置Java类型查找。
• PropertySource based configuration for connecting to Redis Sentinel (see: Redis Sentinel Support). PropertySource配置可以链接到哨兵 - Introduction spring-data-redis 的介绍
This document is the reference guide for Spring Data Redis (SDR) Support. It explains Key Value module concepts and semantics and the syntax for various stores namespaces.
For an introduction to key value stores or Spring, or Spring Data examples, please refer to Getting Started - this documentation refers only to Spring Data Redis Support and assumes the user is familiar with the key value storages and Spring concepts. - Why Spring Data Redis? 为什么使用spring -redis
The Spring Framework is the leading full-stack Java/JEE application framework. It provides a lightweight container and a non-invasive programming model enabled by the use of dependency injection, AOP, and portable service abstractions.
NoSQL storages provide an alternative to classical RDBMS for horizontal scalability and speed. In terms of implementation, Key Value stores represent one of the largest (and oldest) members in the NoSQL space.
The Spring Data Redis (or SDR) framework makes it easy to write Spring applications that use the Redis key value store by eliminating the redundant tasks and boiler plate code required for interacting with the store through Spring’s excellent infrastructure support. - Requirements 依赖
Spring Data Redis 1.x binaries requires JDK level 6.0 and above, and Spring Framework 4.2.8.RELEASE and above.
In terms of key value stores, Redis 2.6.x or higher is required. Spring Data Redis is currently tested against the latest 3.0 release. - Getting Started 开始学习吧
Learning a new framework is not always straight forward. In this section, we (the Spring Data team) tried to provide, what we think is, an easy to follow guide for starting with the Spring Data Redis module. Of course, feel free to create your own learning 'path' as you see fit and, if possible, please report back any improvements to the documentation that can help others.
5.1. First Steps 第一步
这段没什么用,告诉你最好先熟悉spring以及在以后的学习中每个模块都有资源链接
As explained in Why Spring Data Redis?, Spring Data Redis (SDR) provides integration between Spring framework and the Redis key value store. Thus, it is important to become acquainted with both of these frameworks (storages or environments depending on how you want to name them). Throughout the SDR documentation, each section provides links to resources relevant however, it is best to become familiar with these topics beforehand.
5.1.1. Knowing Spring
spring 的知识点
Spring Data uses heavily Spring framework’s core functionality, such as the IoC container, resource abstract or AOPinfrastructure. While it is not important to know the Spring APIs, understanding the concepts behind them is. At a minimum, the idea behind IoC should be familiar. That being said, the more knowledge one has about the Spring, the faster she will pick up Spring Data Redis. Besides the very comprehensive (and sometimes disarming) documentation that explains in detail the Spring Framework, there are a lot of articles, blog entries and books on the matter - take a look at the Spring Guides home page for more information. In general, this should be the starting point for developers wanting to try Spring DR.
5.1.2. Knowing NoSQL and Key Value stores
非关系型数据库(这段没什么用)
NoSQL stores have taken the storage world by storm. It is a vast domain with a plethora of solutions, terms and patterns (to make things worse even the term itself has multiple meanings). While some of the principles are common, it is crucial that the user is familiar to some degree with the stores supported by SDR. The best way to get acquainted with these solutions is to read their documentation and follow their examples - it usually doesn’t take more then 5-10 minutes to go through them and if you are coming from an RDMBS-only background many times these exercises can be an eye opener.
5.1.3. Trying Out The Samples
官网的例子
One can find various samples for key value stores in the dedicated example repo, at http://github.com/spring-projects/spring-data-keyvalue-examples. For Spring Data Redis, of interest is the retwisj sample, a Twitter-clone built on top of Redis which can be run locally or be deployed into the cloud. See its documentation, the following blog entry or the live instance for more information.
5.2. Need Help?
If you encounter issues or you are just looking for advice, feel free to use one of the links below:
5.2.1. Community Support 社区帮助
The Spring Data tag on Stackoverflow is a message board for all Spring Data (not just Redis) users to share information and help each other. Note that registration is needed only for posting.
4.2.2. Professional Support
Professional, from-the-source support, with guaranteed response time, is available from Pivotal Software, Inc., the company behind Spring Data and Spring.
5.3. Following Development
找开发人员帮助
For information on the Spring Data source code repository, nightly builds and snapshot artifacts please see the Spring Data home page.
You can help make Spring Data best serve the needs of the Spring community by interacting with developers on Stackoverflow at either spring-data or spring-data-redis.
If you encounter a bug or want to suggest an improvement, please create a ticket on the Spring Data issue tracker.
To stay up to date with the latest news and announcements in the Spring eco system, subscribe to the Spring Community Portal.
Lastly, you can follow the Spring blog or the project team (Thomas and Christoph) on Twitter.
Reference Documentation
Document structure
This part of the reference documentation explains the core functionality offered by Spring Data Redis.
Redis support introduces the Redis module feature set.