Giter Site home page Giter Site logo

redis-client's Introduction

  • 引入依赖
<dependency>
    <groupId>cn.yzw</groupId>
    <artifactId>redis-client-spring-boot-starter</artifactId>
    <version>最新版本</version>
</dependency>
  • 使用:在应用中的任何地方注入如下对象即可:
  • 配置文件说明:单机、集群、哨兵均只需要配置一个地址,客户端做了拓扑发现,无需配置多个地址
@Resource
private RedisClient redisClient;
  • 关于配置文件,类似如下,在IDE中输入redis.client打头的配置会有自动提示,按照提示配置即可
# 单机
#redis.client.server=standalone
#redis.client.host=172.16.1.55

# 集群
#redis.client.server=cluster
#redis.client.host=172.16.0.239
#redis.client.port=6379

# 哨兵
redis.client.server=sentinel
redis.client.host=172.16.0.239
redis.client.port=26301
redis.client.password=test123
redis.client.sentinel.master-id=mymaster

redis-client's People

Contributors

dreamroute avatar

Watchers

James Cloos 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.