1. 概念
https://www.jianshu.com/p/7bf5dc61ca06
2. springmvc集成
<dependency> <groupId>redis.clients</groupId> <artifactId>jedis</artifactId> <version>2.9.0</version> </dependency> <dependency> <groupId>org.springframework.data</groupId> <artifactId>spring-data-redis</artifactId> <version>1.8.1.RELEASE</version> </dependency>
<?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context" xmlns:mvc="http://www.springframework.org/schema/mvc" xsi:schemaLocation="http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-4.0.xsd http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.0.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.0.xsd"> <context:component-scan base-package="com.flying.redis" /> <!-- 加载文件 --> <context:property-placeholder ignore-unresolvable="true" location="classpath:redis.properties" /> <!-- redis连接池 ,jedis 配置 --> <bean id="poolConfig" class="redis.clients.jedis.JedisPoolConfig"> <property name="maxIdle" value="${redis.maxIdle}" /> <property name="minIdle" value="${redis.minIdle}" /> <property name="maxWaitMillis" value="${redis.maxWait}" /> <property name="testOnBorrow" value="${redis.testOnBorrow}" /> </bean> <!-- redis连接工厂,redis服务器中心 --> <bean id="connectionFactory" class="org.springframework.data.redis.connection.jedis.JedisConnectionFactory"> <property name="poolConfig" ref="poolConfig" /> <property name="hostName" value="${redis.host}"/> <property name="port" value="${redis_port}"/> <property name="password" value=""/> <property name="timeout" value="${redis_timeout}"/> </bean> <!-- redis操作模板,面向对象的模板 --> <bean id="redisTemplate" class="org.springframework.data.redis.core.StringRedisTemplate"> <property name="connectionFactory" ref="connectionFactory" /> <!-- 如果不配置Serializer,那么存储的时候只能使用String,如果用对象类型存储,那么会提示错误 --> <property name="keySerializer"> <bean class="org.springframework.data.redis.serializer.StringRedisSerializer" /> </property> <property name="valueSerializer"> <bean class="org.springframework.data.redis.serializer.JdkSerializationRedisSerializer" /> </property> </bean> <!-- session设置,将sesson放入redis --> <bean id="redisHttpSessionConfiguration" class="org.springframework.session.data.redis.config.annotation.web.http.RedisHttpSessionConfiguration"> <property name="maxInactiveIntervalInSeconds" value="1800"/> </bean> </beans>
3. redis实现并发锁
https://www.cnblogs.com/onions/p/5685674.html
4. redis高并发解决方案
http://conf2.travelsky.com/pages/viewpage.action?pageId=122559897
5. redis超时key的策略
https://www.cnblogs.com/lukexwang/p/4694094.html
6.redis中zset
相关推荐
根据《Redis笔记-尚硅谷周阳V1.3》整理,脑图、思维导图xmind
狂神说课程redis笔记全部内容。
狂神说-Redis笔记(完整版).md
狂神说Redis笔记.md
Redis笔记.doc
NoSql,Redis笔记pdf版本
Redis 笔记.pdf
redis笔记+资料完整版。适合于基础学习。比较完善的资料!
狂神说-Redis笔记(完整版).md
NoSql数据库之Redis笔记
大数据之Redis笔记.pdf,这是一份关于Redis方面的文档,希望可以帮助学习者
尚硅谷周阳Redis笔记Xmind脑图,非PDF版,需要的自行下载.
redis笔记.docx redis笔记.docx redis笔记.docx redis笔记.docx redis笔记.docx redis笔记.docx redis笔记.docx
Redis笔记Redis笔记Redis笔记Redis笔记Redis笔记Redis笔记Redis笔记Redis笔记Redis笔记Redis笔记Redis笔记Redis笔记Redis笔记Redis笔记Redis笔记Redis笔记Redis笔记Redis笔记Redis笔记Redis笔记Redis笔记Redis笔记...
redis笔记
Redis笔记总结的一些资料 Redis笔记总结的一些资料Redis笔记总结的一些资料Redis笔记总结的一些资料
这是在学习Java中的狂神课堂上的redis的笔记整理,是狂神整理好这里我自己收藏的,有需要的小伙伴们可以来领取就可以了。
redis 可以用来存储字符串,哈希结构,链表,集合,因此,常用来提供数据结构服务,本文为操作手册基本命令等