redis - grandhappy/springboot GitHub Wiki

Redis

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, geospatial indexes with radius queries and streams. 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.

website:https://redis.io

part 1

how to import redis?

  1. import spring-boot-starter-data-redis dependence in pom
  2. config redis in application.properties
  3. code RedisController.java to test how to test?
  4. open redis-client,exec commond 'set news {code:200,message:"success"}'
  5. curl -X GET http://127.0.0.1:8080/redis
{
 	code: 200,
 	message: "success"
}