您现在的位置是:Instagram刷粉絲, Ins買粉絲自助下單平台, Ins買贊網站可微信支付寶付款 > 

02 redis的發布訂閱業務場景(Spring Boot使用Redis進行消息的發布訂閱 原創)

Instagram刷粉絲, Ins買粉絲自助下單平台, Ins買贊網站可微信支付寶付款2024-05-28 04:10:34【】0人已围观

简介(Stringmessage){logger.info("消息接收:"+message);JSONObjectobject=JSONObject.parseObject(messa

(String message) {

logger.info("消息接收:"+message);

JSONObject object = JSONObject.parseObject(message);

String businessType = object.getString("businessType");

logger.info("處理業務類型:businessType="+businessType);

if(BusinessTypeEnum.UPDATE_SYSTEM_CONFIG.toString().equals(businessType)){ //處理SystemConfig緩存

String jsonStr = object.getString("jsonStr");

if(jsonStr!=null&&!"".equals(jsonStr)){

JSONObject json = JSONObject.parseObject(object.getString("jsonStr"));

for(String key:json.keySet()){

String value = json.getString(key);

SystemConfig systemConfig = SystemConfigContainer.instance().getSystemConfig(key);

if(systemConfig!=null){

systemConfig.setKeyValue(value);

SystemConfigContainer.instance().uptSystemConfig(systemConfig);

}else{

systemConfig = systemConfigService.selectByPrimaryJianMing(key);

systemConfig.setKeyValue(value);

SystemConfigContainer.instance().uptSystemConfig(systemConfig);

}

}

}

}

}

}

很赞哦!(4953)

Instagram刷粉絲, Ins買粉絲自助下單平台, Ins買贊網站可微信支付寶付款的名片

职业:程序员,设计师

现居:山西大同浑源县

工作室:小组

Email:[email protected]