GithubHelp home page GithubHelp logo

tempbottle / spring-data-redis Goto Github PK

View Code? Open in Web Editor NEW

This project forked from spring-projects/spring-data-redis

0.0 3.0 0.0 14.43 MB

Provides support to increase developer productivity in Java when using Redis, a key-value store. Uses familiar Spring concepts such as a template classes for core API usage and lightweight repository style data access.

Home Page: http://projects.spring.io/spring-data/

Makefile 0.14% Java 99.84% Lua 0.03%

spring-data-redis's Introduction

Spring Data Redis

The primary goal of the 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://redis.io/) store.

Docs

You can find out more details from the user documentation or by browsing the javadocs.

Examples

For examples on using the Spring Data Key Value, see the dedicated project, also available on GitHub

Artifacts

  • Maven:
<dependency>
  <groupId>org.springframework.data</groupId>
  <artifactId>spring-data-redis</artifactId>
  <version>${version}</version>
</dependency> 

<!-- used for nightly builds -->
<repository>
  <id>spring-maven-snapshot</id>
  <snapshots><enabled>true</enabled></snapshots>
  <name>Springframework Maven SNAPSHOT Repository</name>
  <url>http://repo.spring.io/libs-release</url>
</repository> 

<!-- used for milestone/rc releases -->
<repository>
  <id>spring-maven-milestone</id>
  <name>Springframework Maven Milestone Repository</name>
  <url>http://repo.spring.io/libs-milestone</url>
</repository> 
  • Gradle:
repositories {
   maven { url "http://repo.spring.io/libs-milestone" }
   maven { url "http://repo.spring.io/libs-snapshot" }
}

// used for nightly builds
dependencies {
   compile "org.springframework.data:spring-data-redis:${version}"
}

Latest GA release is 1.2.1.RELEASE
Latest nightly is 1.3.0.BUILD-SNAPSHOT

Usage (for the impatient)

  • Configure the Redis connector to use (here jedis):
<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"
  xsi:schemaLocation="
  http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
  
  <bean id="jedisFactory" class="org.springframework.data.redis.connection.jedis.JedisConnectionFactory"/>
  
  <bean id="redisTemplate" class="org.springframework.data.redis.core.RedisTemplate"
      p:connection-factory="jedisFactory"/>
</beans>
  • Use RedisTemplate to interact with the Redis store:
String random = template.randomKey();
template.set(random, new Person("John", "Smith"));
  • Use Redis 'views' to execute specific operations based on the underlying Redis type:
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 Data Redis 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.

To generate IDE-specific files, use

gradlew eclipse

or

gradlew idea 

depending on your editor.

Contributing

Here are some ways for you to get involved in the community:

  • Get involved with the Spring community on the Stackoverflow. Please help out on the spring-data-redis tag by responding to questions and joining the debate.
  • Create JIRA tickets for bugs and new features and comment and vote on the ones that you are interested in.
  • Watch for upcoming articles on Spring by subscribing to spring.io.

Github is for social coding: if you want to write code, we encourage contributions through pull requests from forks of this repository. If you want to contribute code this way, read the Spring Framework [contributor guidelines] (https://github.com/spring-projects/spring-framework/blob/master/CONTRIBUTING.md).

Staying in touch

Follow the project team (@thomasdarimont, @stroblchristoph) on Twitter. In-depth articles can be found at the Spring team blog, and releases are announced via our news feed.

spring-data-redis's People

Contributors

bm3780 avatar burtbeckwith avatar christophstrobl avatar gregturn avatar heartsavior avatar jbrisbin avatar jencompgeek avatar jokeway avatar kshchepanovskyi avatar liujiong1982 avatar odrotbohm avatar porcelijn avatar reta avatar ryanad avatar snicoll avatar spring-builds avatar wilkinsona avatar xpoft avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.