Small class D - Basics zero SpringBoot2.X to combat _ Section 9 SpringBoot2.x integrate Redis combat _40, Redis tools package to explain and combat

notes


. 4, Redis explanation and practical tools package
    Introduction: manner Redis efficient development and practical tools to explain the package
        1, the client used https://redisdesktop.com/download
        2, and operating tools package redis

Start

Mainly about the development of skills

Redis desktop management tools RedisDesktopManager 2019.2 released

https://www.oschina.net/news/108331/redis-desktop-manager-2019-2-released?p=2

Redis default there are 16 libraries

of our default action is the first library. This is what we have just put in value

Packaging tools and operations redis

JsonUtils tools, the object to be converted to a string.

Jsckson mainly through the package to operate the



package RedisClient class


injection StringRedisTemplate, add set method

home a method of obtaining

controller inside use



Start the application to test

call the add method



to get the value

Objects into redis


Possible naming, separated by colons. After separated by a colon check redis which there will be a tool through layers of folders format

plus a value of the acquisition method

starts the application

in front of each of the colon to form a folder

to find efficiency are placed together faster than all the key

values

unit test




Direct running the test method



Guess you like

Origin www.cnblogs.com/wangjunwei/p/11426628.html