1.先添加缓存:
使用jedisClient.set(key,value);到redis缓存中,并设置过期时间,
使用properties文件的形式存取key ,在类中使用@Value(${key})注入,
2.查询缓存:
如果缓存存在直接return查询到的数据,但是要验证一下jedisClient.get(key)到的数据是否空的,使用StrinUtils.isNotBlank(json);