|
@@ -1,6 +1,7 @@
|
|
|
package com.xc.controller;
|
|
|
|
|
|
import com.jfinal.plugin.activerecord.Db;
|
|
|
+import com.xc.utils.PropertiesUtil;
|
|
|
import com.xc.utils.websocket.WsClient;
|
|
|
import org.java_websocket.WebSocket;
|
|
|
import org.slf4j.Logger;
|
|
@@ -23,8 +24,8 @@ public class WebSocketTestController {
|
|
|
@ResponseBody
|
|
|
public String star() {
|
|
|
try {
|
|
|
-
|
|
|
- WsClient myClient = new WsClient(new URI(wssurl1));
|
|
|
+ String url = PropertiesUtil.getProperty("ws.url")+"zxdata987654+";
|
|
|
+ WsClient myClient = new WsClient(new URI(url));
|
|
|
myClient.connect();
|
|
|
while (!myClient.getReadyState().equals(WebSocket.READYSTATE.OPEN)) {
|
|
|
System.out.println("连接中···请稍后");
|
|
@@ -36,7 +37,6 @@ public class WebSocketTestController {
|
|
|
|
|
|
return "true";
|
|
|
}
|
|
|
- //查询企业公告信息
|
|
|
@RequestMapping({"test.do"})
|
|
|
@ResponseBody
|
|
|
public String star2() {
|