Giter Site home page Giter Site logo

redis-spring-boot-starter's Introduction

版本说明

       --注:最新版本master未经过测试请使用tag版本
默认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)

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

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

redis-spring-boot-starter's Issues

发现个问题

public class RedisSingleProcessor extends AbstractRedisProcessor {

private static Jedis jedis=null;

private Jedis getSingle() {
    if (jedis == null) {
        JedisConnectionFactory jedisConnectionFactory = getConnectionFactory();
        jedis = (Jedis) jedisConnectionFactory.getConnection().getNativeConnection();
        return jedis;
    }
    return jedis;
}

我第一次进来取的jedis没问题,第二次直接返回的jedis就没有我配置文件的信息了jedis的dataSoure就是空的?

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.