浏览代码

add im即时通信

18339543638 3 年之前
父节点
当前提交
807aebfde2

+ 1 - 1
nb-common/config-common/src/main/java/com/nb/common/config/web/CorsConfig.java

@@ -12,7 +12,7 @@ import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
  * @Description TODO
  * @createTime 2022年03月23日 14:49:00
  */
-//@Configuration
+@Configuration
 @Profile("dev")
 public class CorsConfig implements WebMvcConfigurer {
     @Override

+ 2 - 1
nb-common/ws-common/src/main/java/com/nb/common/websocket/DefaultMessageListener.java

@@ -44,7 +44,8 @@ public class DefaultMessageListener implements PatternMessageListener<TopicMessa
             } catch (JsonProcessingException e) {
                 log.error("ws消息订阅,解析失败,message:【】", JSONUtil.toJsonStr(msg));
             }
-        }else {
+        }
+        else {
             channelContext.setClosed(true);
             rPatternTopic.removeListener(this);
             Tio.remove(channelContext,"通道已关闭,移除该通道");