我已经使用spring boot将数据保存在Redis中。使用以下代码:
@Cacheable(value="gsonMap",key = "#strCampCusrId")
public Map<String, Object> updateCustomerConfigInCache(String strCampCusrId, Map<String, Object> gsonMap) {
logger.debug("Get from cache..."+strCampCusrId+" .. value : "+gsonMap);
return gsonMap;
}
我已成功逐出java中的数据。
但是当我尝试获取节点中的数据时,我看到它无法识别相同的键并显示值为null。KeyName为 bayloruattesting
var redis = require('redis');
const constants = require('./Constant.js');
var client = redis.createClient(constants.redis_port, constants.redis_host); //creates a new client
client.on('connect', function() {
console.log(' redis connected');
});
client.GET('bayloruattesting', (err, reply) => {
console.log(reply);
});
module.exports = client
请帮助!