向redis里set一个键值对
作者:互联网
@Autowired
private RedisTemplate<String, String> redisTemplate;
//set到redis中
redisTemplate.opsForValue().set(RedisKeyConstant.AGV_CODE,"0");
//读取redis中的key获取value
final ValueOperations<String, String> forValue = redisTemplate.opsForValue();
标签:CODE,opsForValue,redis,set,键值,redisTemplate 来源: https://www.cnblogs.com/zuiqiangJAVA/p/15840809.html