修改打包环境

This commit is contained in:
2023-10-20 16:43:06 +08:00
parent e990133b64
commit 3f79124393
6 changed files with 53 additions and 7 deletions

View File

@@ -6,6 +6,7 @@ import com.lld.im.common.enums.RouteHashMethodEnum;
import com.lld.im.common.route.RouteHandle;
import com.lld.im.common.route.algorithm.consistenthash.AbstractConsistentHash;
import com.lld.im.service.utils.SnowflakeIdWorker;
import lombok.extern.slf4j.Slf4j;
import org.I0Itec.zkclient.ZkClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
@@ -18,6 +19,7 @@ import java.lang.reflect.Method;
* @author: lld
* @version: 1.0
*/
@Slf4j
@Configuration
public class BeanConfig {
@@ -26,6 +28,10 @@ public class BeanConfig {
@Bean
public ZkClient buildZKClient() {
log.info("================================================zkclient================================================");
log.info("================================================zkclient================================================");
log.info("================================================zkclient================================================");
log.info(appConfig.getZkAddr());
return new ZkClient(appConfig.getZkAddr(),
appConfig.getZkConnectTimeOut());
}

View File

@@ -2,6 +2,7 @@ package com.lld.im.service.user.controller;
import com.lld.im.common.ClientType;
import com.lld.im.common.ResponseVO;
import com.lld.im.common.config.AppConfig;
import com.lld.im.common.route.RouteHandle;
import com.lld.im.common.route.RouteInfo;
import com.lld.im.common.utils.RouteInfoParseUtil;
@@ -28,6 +29,9 @@ import java.util.List;
@RequestMapping("v1/user")
@Slf4j
public class ImUserController {
@Autowired
AppConfig appConfig;
@Autowired
ImUserService imUserService;
@@ -73,7 +77,10 @@ public class ImUserController {
}
String s = routeHandle.routeServer(allNode, req
.getUserId());
RouteInfo parse = RouteInfoParseUtil.parse(s);
return ResponseVO.successResponse(parse);
}

View File

@@ -4,7 +4,7 @@ spring:
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
password: beAs0LHX2GyTxMw4
url: jdbc:mysql://43.139.191.204:3306:3306/im-core?serverTimezone=UTC&useSSL=false&characterEncoding=UTF8
url: jdbc:mysql://43.139.191.204:3306/im-core?serverTimezone=UTC&useSSL=false&characterEncoding=UTF8
username: root
redis: