package com.younike.web.core.config;

import lombok.extern.log4j.Log4j2;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.data.redis.connection.Message;
import org.springframework.data.redis.listener.adapter.MessageListenerAdapter;
import org.springframework.stereotype.Service;

/**
 * redis 消息订阅处理
 *
 * 电梯异常处理
 *
 * @author chenpengfei
 */
@Service
@Log4j2
public class RedisMessageSubscriber extends MessageListenerAdapter {



    @Value("${spring.profiles.active}")
    private String active;

    @Override
    public void onMessage(Message message, byte[] bytes) {
        if (active.equals("dev")) return;
    }
}
