package com.bohuikeji.delivery.backstage.config;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import lombok.extern.slf4j.Slf4j;
import org.springframework.data.redis.connection.Message;
import org.springframework.data.redis.connection.MessageListener;
import org.springframework.stereotype.Component;

/**
 * Redis消息结束类
 * @author Admin
 */
@Slf4j
@Component
public class RedisPushSocketReceiver implements MessageListener {
    @Override
    public void onMessage(Message message, byte[] pattern) {
        log.info("Redis监听到消息:{}",new String(message.getBody()));
        JSONObject json= JSON.parseObject(message.toString());


    }
}
