|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.dy.common.aop.SsoCheck; | 
|---|
|  |  |  | import com.dy.common.aop.SsoVo; | 
|---|
|  |  |  | import com.dy.common.springUtil.SpringContextUtil; | 
|---|
|  |  |  | import lombok.extern.slf4j.Slf4j; | 
|---|
|  |  |  | import org.springframework.beans.factory.annotation.Autowired; | 
|---|
|  |  |  | import org.springframework.context.annotation.Scope; | 
|---|
|  |  |  | 
|---|
|  |  |  | webSocketMap.put(token, this); | 
|---|
|  |  |  | WebSocketServer.addOnlineCount(); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if(this.ssoCheck == null){ | 
|---|
|  |  |  | //2025-07-22 不知为什么,this.ssoCheck会为null | 
|---|
|  |  |  | this.ssoCheck = SpringContextUtil.getBean(SsoCheck.class); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | Object rObj = this.ssoCheck.check(token); | 
|---|
|  |  |  | if(rObj != null) { | 
|---|
|  |  |  | if (rObj instanceof SsoVo ssoVo) { | 
|---|
|  |  |  | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @OnError | 
|---|
|  |  |  | public void onError(Session session, Throwable error) { | 
|---|
|  |  |  | log.error("客户端:" + this.token + ",websocket会话异常,原因:" + error.getMessage()); | 
|---|
|  |  |  | //log.error("客户端:" + this.token + ",websocket会话异常,原因:" + error.getMessage()); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|