Operating on Linux: REDIS-CLI link redis-cli-a password
You can also enter the password individually: 127.0.0.1:6379>auth d3bcc7a988ad2d652276bca0ad8141a5
To view an existing key value pair: 127.0.0.1:6379> keys *
Configure master-Slave server:
Configuring the slave server is simple by adding the following configuration to the slave configuration file:
Slaveof Masterip Masterport
If the host is enabled for logon verification, then you need to add the following sentence: Masterauth Authpassword
Java link Redis cache: <!--redis--> < Bean id = "Poolconfig" class = "Redis.clients.jedi S.jedispoolconfig "> < property name =" Maxidle "value =" ${redis . Maxidle} "/> < Property name = "Maxwaitmillis" value = "${redis.maxwait}"/> < P Roperty name = "Testonborrow" value = "${redis.testonborrow}"/> </bean > < Bean id = "Jedisconnectionfactory" class = " Org.springframework.data.redis.connection.jedis.JedisConnectionFactory "P:host-name =" ${redis.host} "P:port =" ${ Redis.port} ' P:use-pool = ' true ' P:password = ' ${redis.password} '/> < Bean id = ' redistemplate ' class = "Org.springframework.data.redis.core.RedisTemplate" p:connection-factory-ref = "Jedisconnectionfactory"/&Gt < Bean id = "CacheManager" class = "Org.springframework.data.redis.cache.RedisCacheManager" C: Redis-operations-ref = "Redistemplate" > < property name = "Expires" > &nbs P < map > <!-- <entry key= "Logformat" value= "${redis.logformat.timeout}"/>--> < entry key = "Existtask" value = "${redis.existtask.timeout}"/> </map > </Property & Gt </Bean > <!--redis end-->
${} This representation is a variable, configured in the Config.properties file.