+ update readme

This commit is contained in:
Costin Leau
2011-12-13 14:37:54 +02:00
parent 711bc14361
commit a6f2309c44
2 changed files with 60 additions and 34 deletions

View File

@@ -1,12 +1,13 @@
#Tue Nov 01 18:44:46 EET 2011
#
#Tue Dec 06 12:17:13 EET 2011
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.compliance=1.5
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.5
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.5
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error

View File

@@ -4,42 +4,54 @@ Spring Data Redis
The primary goal of the [Spring Data](http://www.springsource.org/spring-data) project is to make it easier to build Spring-powered applications that use new data access technologies such as non-relational databases, map-reduce frameworks, and cloud based data services.
This modules provides integration with the [Redis] (http://code.google.com/p/redis/) store.
Examples
--------
# Docs
You can find out more details from the [user documentation](http://static.springsource.org/spring-data/redis/docs/current/reference/) or by browsing the [javadocs](http://static.springsource.org/spring-data/redis/docs/current/api/).
# Examples
For examples on using the Spring Data Key Value, see the dedicated project, also available on [GitHub](https://github.com/SpringSource/spring-data-keyvalue-examples)
Getting Help
------------
# Artifacts
Read the main project [website](http://www.springsource.org/spring-data) and the [User Guide](http://static.springsource.org/spring-data/datastore-keyvalue/snapshot-site/reference/html/). Look at the source code and the [JavaDocs](http://static.springsource.org/spring-data/data-keyvalue/snapshot-site/apidocs/). For more detailed questions, use the [forum](http://forum.springsource.org/forumdisplay.php?f=80). If you are new to Spring as well as to Spring Data, look for information about [Spring projects](http://www.springsource.org/projects).
* Maven:
Quick Start
-----------
~~~~~ xml
## Redis
For those in a hurry:
* Download the jar through Maven:
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-redis</artifactId>
<version>${version}</version>
</dependency>
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-redis</artifactId>
<version>1.0.0.BUILD-SNAPSHOT</version>
</dependency>
<repository>
<id>spring-maven-snapshot</id>
<snapshots><enabled>true</enabled></snapshots>
<name>Springframework Maven SNAPSHOT Repository</name>
<url>http://maven.springframework.org/snapshot</url>
</repository>
~~~~~
* Gradle:
<repository>
<id>spring-maven-snapshot</id>
<snapshots><enabled>true</enabled></snapshots>
<name>Springframework Maven SNAPSHOT Repository</name>
<url>http://maven.springframework.org/snapshot</url>
</repository>
~~~~~ groovy
repositories {
mavenRepo name: "spring-snapshot", urls: "http://maven.springframework.org/snapshot"
}
dependencies {
compile "org.springframework.data:spring-data-redis:${version}"
}
~~~~~
The latest `version` is _1.0.0.RC1_
# Usage (for the impatient)
* Configure the Redis connector to use (here [jedis](https://github.com/xetorthio/jedis)):
~~~~~ xml
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance
xmlns:p="http://www.springframework.org/schema/p"
@@ -51,20 +63,33 @@ For those in a hurry:
<bean id="redisTemplate" class="org.springframework.data.redis.core.RedisTemplate"
p:connection-factory="jedisFactory"/>
</beans>
~~~~~
* Use `RedisTemplate` to interact with the Redis store:
~~~~~ 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
ListOperations<String, Person> listOps = template.listOps();
listOps.rightPush(random, new Person("Jane", "Smith"));
List<Person> peopleOnSecondFloor = listOps.range("users:floor:2", 0, -1);
~~~~~
# Building
Spring Hadoop uses Gradle as its build system. To build the system simply run:
gradlew
from the project root folder. This will compile the sources, run the tests and create the artifacts.
# Contributing
Contributing to Spring Data
---------------------------
Here are some ways for you to get involved in the community: