-
Notifications
You must be signed in to change notification settings - Fork 7
Nosql Redis
Landy.Liu edited this page May 26, 2019
·
1 revision
Spring Data Redis 2.x binaries require JDK level 8.0 and above and Spring Framework 5.1.5.RELEASE and above.
In terms of key-value stores, Redis 2.6.x or higher is required. Spring Data Redis is currently tested against the latest 4.0 release.
Redis 依赖Maven坐标
<!--redis-->
<properties>
<!--redis-->
<jedis.version>2.10.0-m1</jedis.version>
<spring.data.redis.version>2.1.5.RELEASE</spring.data.redis.version>
</properties>
<dependency>
<groupId>redis.clients</groupId>
<artifactId>jedis</artifactId>
<version>${jedis.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-redis</artifactId>
<version>${spring.data.redis.version}</version>
<exclusions>
<exclusion>
<groupId>org.springframework</groupId>
<artifactId>spring-tx</artifactId>
</exclusion>
<exclusion>
<groupId>org.springframework</groupId>
<artifactId>spring-oxm</artifactId>
</exclusion>
<exclusion>
<groupId>org.springframework</groupId>
<artifactId>spring-aop</artifactId>
</exclusion>
<exclusion>
<groupId>org.springframework</groupId>
<artifactId>spring-context-support</artifactId>
</exclusion>
</exclusions>
</dependency>
Jedis版本为2.2.1会出现如下问题,Jedis对象正好有一个名字叫做shutdown的方法,虽然Jedis对象没有指定destoryMethod,但是被Spring 自动推断注册成为了DisposableBean!!!并且把shutdown()方法注册为destoryMethod,在程序运行结束的时候会调用shutdown(),发送SHUTDOWN关闭了Redis服务器!!!
SegmentFault: https://segmentfault.com/u/landy8530
简书:https://www.jianshu.com/u/36a7d3a994ac
CSDN:https://blog.csdn.net/landy8530
开源中国:https://my.oschina.net/landy8530
微信公众号:蚂蚁与咖啡的故事
Core组件
DataCache组件
Nosql组件
Export组件
文件服务组件
操作指引