From d129e6550ded1b7cf1a3e773ab6a5865be526977 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Thu, 9 Nov 2017 14:49:23 +0100 Subject: [PATCH] DATAREDIS-726 - Fix url to snapshot repository in readme. --- README.md | 56 ++++++++++++++++++++++++++++--------------------------- 1 file changed, 29 insertions(+), 27 deletions(-) diff --git a/README.md b/README.md index 3f46c02da..3901e51cf 100644 --- a/README.md +++ b/README.md @@ -17,35 +17,37 @@ For examples on using the Spring Data Key Value, see the dedicated project, also # Artifacts -* Maven: +## Maven configuration -~~~~~ xml +Add the Maven dependency: +```xml org.springframework.data spring-data-redis - ${version} - + ${version}.RELEASE + +``` + +If you'd rather like the latest snapshots of the upcoming major version, use our Maven snapshot repository and declare the appropriate dependency version. + +```xml + + org.springframework.data + spring-data-redis + ${version}.BUILD-SNAPSHOT + - - spring-maven-snapshot - true - Springframework Maven SNAPSHOT Repository - http://repo.spring.io/libs-release - + spring-libs-snapshot + Spring Snapshot Repository + http://repo.spring.io/libs-snapshot + +``` - - - spring-maven-milestone - Springframework Maven Milestone Repository - http://repo.spring.io/libs-milestone - -~~~~~ +## Gradle -* Gradle: - -~~~~~ groovy +```groovy repositories { maven { url "http://repo.spring.io/libs-milestone" } maven { url "http://repo.spring.io/libs-snapshot" } @@ -55,13 +57,13 @@ repositories { dependencies { compile "org.springframework.data:spring-data-redis:${version}" } -~~~~~ +``` # Usage (for the impatient) * Configure the Redis connector to use (here [jedis](https://github.com/xetorthio/jedis)): -~~~~~ xml +```xml -~~~~~ +``` * Use `RedisTemplate` to interact with the Redis store: -~~~~~ java +```java String random = template.randomKey(); template.set(random, new Person("John", "Smith")); -~~~~~ +``` * Use Redis 'views' to execute specific operations based on the underlying Redis type: -~~~~~ java +```java ListOperations listOps = template.listOps(); listOps.rightPush(random, new Person("Jane", "Smith")); List peopleOnSecondFloor = listOps.range("users:floor:2", 0, -1); -~~~~~ +``` # Building