|  |  |  | 
|---|
|  |  |  | package com.moral.api.config.websocket; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.moral.api.websocket.CruiserWebSocketServer; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.moral.api.websocket.SingleDeviceServer; | 
|---|
|  |  |  | import org.springframework.beans.factory.annotation.Autowired; | 
|---|
|  |  |  | import org.springframework.context.annotation.Bean; | 
|---|
|  |  |  | import org.springframework.context.annotation.Configuration; | 
|---|
|  |  |  | import org.springframework.data.redis.core.RedisTemplate; | 
|---|
|  |  |  | import org.springframework.web.socket.server.standard.ServerEndpointExporter; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | 
|---|
|  |  |  | public ServerEndpointExporter serverEndpointExporter(){ | 
|---|
|  |  |  | return new ServerEndpointExporter(); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | public void setMessageService(RedisTemplate redisTemplate){ | 
|---|
|  |  |  | SingleDeviceServer.redisTemplate = redisTemplate; | 
|---|
|  |  |  | CruiserWebSocketServer.redisTemplate = redisTemplate; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|