Giter Site home page Giter Site logo

wdxfree / redis-spring-boot-starter Goto Github PK

View Code? Open in Web Editor NEW

This project forked from niuzhiweimr/redis-spring-boot-starter

0.0 1.0 0.0 43 KB

spring boot 集成redis封装,支持redis模式: 单点、集群、哨兵操作,已在生产环境使用,在redis操作统一升级迭代时无需改动业务代码

Java 100.00%

redis-spring-boot-starter's Introduction

版本说明

默认spring boot 版本为 2.1.5.RELEASE 下载完成项目后可更改为自己项目使用的spring boot版本  

redis集成说明

1:启动类需要注解 { @EnableRedis } 开启redis(默认单点模式)

    redis模式:
          1.单点:@EnableRedis(value = RedisModeConstants.REDIS_SINGLE)
          2.集群:@EnableRedis(value = RedisModeConstants.REDIS_CLUSTER)
          3.哨兵:@EnableRedis(value = RedisModeConstants.REDIS_SENTINEL)
    
    提示: 请修改启动类@SpringBootApplication为如下代码:
        @SpringBootApplication(scanBasePackages = {"com.easy.*"})

2:关于redis的配置参数 详见类 { RedisProperties }

3:maven导入坐标 ${version}根据自己编译的版本选择导入

    <dependency>
       <groupId>com.easy.redis</groupId>
        <artifactId>redis-spring-boot-starter</artifactId>
        <version>${version}</version>
    </dependency>

redis使用说明

1:注入 EasyRedisTemplate 即可使用所有redis操作函数 例:

 1> 注入
 
 @Autowired
 private EasyRedisTemplate easyRedisTemplate;

 2> 使用函数
 
 easyRedisTemplate.set("helloWorld", "helloWorld");

redis-spring-boot-starter's People

Contributors

niuzhiweimr avatar

Watchers

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