OWL ITS + 탐지시스템(인터넷 진흥원)
이민희
2022-02-18 612b5a21417f3c8dcaed84c1c0691dc883088f61
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
package kr.wisestone.owl.config.websocket;
 
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Service;
import org.springframework.data.redis.listener.ChannelTopic;
 
import java.util.Map;
 
@Service
public class RedisPublisher {
 
    @Autowired
    private RedisTemplate redisTemplate;
 
    public void publish(ChannelTopic channelTopic, Map<String, Object> message) {
        this.redisTemplate.convertAndSend(channelTopic.getTopic(), message);
    }
}