This commit is contained in:
2023-10-10 17:04:00 +08:00
parent df59768830
commit 0f8b225f4e
11 changed files with 11 additions and 93 deletions

View File

@@ -13,6 +13,7 @@
<properties>
<java.version>1.8</java.version>
</properties>
<packaging>jar</packaging>
<artifactId>im-service</artifactId>

View File

@@ -5,10 +5,6 @@ import com.lld.im.common.enums.ImUrlRouteWayEnum;
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.common.route.algorithm.consistenthash.ConsistentHashHandle;
import com.lld.im.common.route.algorithm.consistenthash.TreeMapConsistentHash;
import com.lld.im.common.route.algorithm.loop.LoopHandle;
import com.lld.im.common.route.algorithm.random.RandomHandle;
import com.lld.im.service.utils.SnowflakeIdWorker;
import org.I0Itec.zkclient.ZkClient;
import org.springframework.beans.factory.annotation.Autowired;
@@ -44,6 +40,7 @@ public class BeanConfig {
routWay = handler.getClazz();
RouteHandle routeHandle = (RouteHandle) Class.forName(routWay).newInstance();
if(handler == ImUrlRouteWayEnum.HASH){
Method setHash = Class.forName(routWay).getMethod("setHash", AbstractConsistentHash.class);