2017-06-24 17:23:05.0|分类: redis|浏览量: 1708
Redis is an open source (BSD licensed), in-memory data structure store, used as a database, cache and message broker. It supports data structures such as strings, hashes, lists, sets, sorted sets with range queries, bitmaps, hyperloglogs and geospatial indexes with radius queries. Redis has built-in replication, Lua scripting, LRU eviction, transactions and different levels of on-disk persistence, and provides high availability via Redis Sentinel and automatic partitioning with Redis Cluster. redis官网地址:https://redis.io/ redis下载地址:https://redis.io/download redis的win版本下载地址:https://github.com/MSOpenTech/redis redis下载win版本压缩文件夹,然后直接解压,发现有几个文件:
redis启动默认加载的端口号是6379。 RedisDesktopManager是redis可视化工具,查看reids内容比较方便。 jedis是java访问redis数据库的驱动,maven引入配置如下: <dependency> <groupId>redis.clients</groupId> <artifactId>jedis</artifactId> <version>2.9.0</version> <type>jar</type> <scope>compile</scope> </dependency> 假如用户保存数据foo=bar,key是foo,value=bar。java的API代码如下: Jedis jedis = new Jedis("localhost"); jedis.set("foo", "bar"); String value = jedis.get("foo"); |