Commit 7959107f by giaogiao

修改配置

parent a26c1a50
......@@ -77,23 +77,18 @@ public class WsReadHandler extends SimpleChannelInboundHandler<TextWebSocketFram
}
/**
* 检测到异常
*
* @param ctx
* @param cause
* @throws Exception
*/
@Override
public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) {
log.info("检测到异常exceptionCaught", cause);
//排除当客户端意外关闭的情况,不是发送指定指令通知服务器退出,就会产生此错误。
if (ctx.channel().isActive()) {
String userIdByChannel = mangerChannelService.getInfoByChannel(ctx);
log.error("uid:" + userIdByChannel + ",ws异常,channelId:" + ctx.channel().id().asLongText(), cause);
}
}
// /**
// * 检测到异常
// *
// * @param ctx
// * @param cause
// * @throws Exception
// */
// @Override
// public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) {
// String userIdByChannel = mangerChannelService.getInfoByChannel(ctx);
// log.info("uid:" + userIdByChannel + ",ws异常,channelId:" + ctx.channel().id().asLongText(), cause);
// }
@Override
public void handlerAdded(ChannelHandlerContext ctx) {
......@@ -102,17 +97,17 @@ public class WsReadHandler extends SimpleChannelInboundHandler<TextWebSocketFram
}
/**
* 客户端不活跃
*
* @param ctx
* @throws Exception
*/
@Override
public void channelInactive(ChannelHandlerContext ctx) {
String userIdByChannel = mangerChannelService.getInfoByChannel(ctx);
log.info("uid:" + userIdByChannel + "," + "channelInactive" + ",channelId:" + ctx.channel().id().asLongText());
}
// /**
// * 客户端不活跃
// *
// * @param ctx
// * @throws Exception
// */
// @Override
// public void channelInactive(ChannelHandlerContext ctx) {
// String userIdByChannel = mangerChannelService.getInfoByChannel(ctx);
// log.info("uid:" + userIdByChannel + "," + "channelInactive" + ",channelId:" + ctx.channel().id().asLongText());
// }
/**
* 移除时触发, 不活跃的情况下会移除,会再次触发该事件
......
......@@ -2,7 +2,7 @@ spring-boot-plus:
# 是否启用ansi控制台输出有颜色的字体,local环境建议开启,服务器环境设置为false
enable-ansi: false
# 当前环境服务IP地址
server-ip: 172.31.32.111
server-ip: 127.0.0.1
# 文件上传下载配置
upload-path: /opt/upload/
# AOP配置
......@@ -16,14 +16,14 @@ spring-boot-plus:
spring:
datasource:
url: jdbc:mysql://172.31.32.111:3306/wecloud_im?serverTimezone=UTC&useUnicode=true&characterEncoding=utf8&useSSL=false&allowPublicKeyRetrieval=true
url: jdbc:mysql://127.0.0.1:3306/wecloud_im?serverTimezone=UTC&useUnicode=true&characterEncoding=utf8&useSSL=false&allowPublicKeyRetrieval=true
username: web
password: axT8knPN5hAP
# Redis配置
redis:
database: 0
host: 172.31.32.111
host: 127.0.0.1
password: JH86uc53r8Ca
port: 6379
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment