websocket测试

This commit is contained in:
李广豪 2022-03-19 22:40:38 +08:00
parent 2104ddc7fc
commit c1ce765634

View File

@ -9,6 +9,7 @@ import com.mt.wms.core.dal.service.*;
import com.mt.wms.core.utils.CodeGeneratorHelper;
import com.mt.wms.core.utils.HttpClient;
import com.mt.wms.core.vo.R;
import com.mt.wms.empty.websocket.WebSocketServer;
import org.junit.jupiter.api.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@ -61,6 +62,13 @@ public class ScheduledTask extends BaseService {
private PointInfoServiceBiz pointInfoServiceBiz;
@Resource
private RunTaskUtils runTaskUtils;
@Resource
private WebSocketServer webSocketServer;
@Scheduled(fixedDelay = 5000)
public void testWebsocket() throws IOException {
webSocketServer.sendtoAll(LocalDateTime.now()+"测试");
}
/**
* 查询加工完成的窑炉