shardingjdbc no database route info 2022-12-29 00:22 186阅读 0赞 初次使用sharding jdbc 进行分库分表操作,运行的时候出现这个错误 ### Error updating database. Cause: java.lang.IllegalStateException: no database route info ### The error may exist in com/ytq/share/mapper/UserMapper.java (best guess) ### The error may involve com.ytq.share.mapper.UserMapper.insert-Inline ### The error occurred while setting parameters ### SQL: INSERT INTO user ( id, user_id, user_name ) VALUES ( ?, ?, ? ) ### Cause: java.lang.IllegalStateException: no database route info] with root cause ### 这个错误是我们分库策略没有配置好 ### * 比如我们使用的数据有两个myds0,myds1 配置如下: * spring.shardingsphere.datasource.names=myds0,myds1 我们的分库策略配置: * 我们可以定义一个默认的分库策略,我们根据这个数据库中所有表的id进行分库,与2取模 spring.shardingsphere.sharding.default-database-strategy.inline.sharding-column=id spring.shardingsphere.sharding.default-database-strategy.inline.algorithm-expression=myds->{ id % 2} 第二种方式,我们针对单个表进行分库策略配置: * 我们根据user表的user\_id对词表进行分库侧率配置 spring.shardingsphere.sharding.tables.user.database-strategy.inline.sharding-column=user_id spring.shardingsphere.sharding.tables.user.database-strategy.inline.algorithm-expression=myds$->{user_id%2}
相关 RocketMQ异常:MQClientException: No route info of this topic解决方案 一、问题背景 在Windwos上安装完RocketMQ,配置完环境之后,启动RocketMQ环境mqnamesrv和mqbroker都正常启动完毕,项目采用SpringB 川长思鸟来/ 2023年06月27日 03:52/ 0 赞/ 203 阅读
相关 shardingjdbc no database route info 初次使用sharding jdbc 进行分库分表操作,运行的时候出现这个错误 Error updating database. Cause: java.lang. Dear 丶/ 2022年12月29日 00:22/ 0 赞/ 187 阅读
相关 org.apache.rocketmq.client.exception.MQClientException: No route info of this topic, TopicTest异常解决 使用RocketMQ发送消息抛出异常,异常如下: org.apache.rocketmq.client.exception.MQClientException: No 一时失言乱红尘/ 2022年12月27日 11:07/ 0 赞/ 94 阅读
相关 亲测有用 已解决rocketmq使用错误:No route info for this topic 问题背景 最近博主在使用rocketmq在windows本地环境下去实现一个多人=聊天的功能 主要是使用了rocketmq的消息队列的功能 但是在启动本地德rocke 妖狐艹你老母/ 2022年11月20日 09:37/ 0 赞/ 359 阅读
相关 MQClientException: No route info of this topic, *** MQClientException: No route info of this topic, TOPIC\_INVOICE\_SYNC\_DEV 这是因为accessKey 缺乏、安全感/ 2022年05月14日 03:58/ 0 赞/ 313 阅读
相关 解决RocketMQ报No route info of this topic:异常 目前rocketmq 被使用的概率大大提升,相信很多朋友也都想着去试试,在测试的过程中根据官网给出的案例,应该有部分朋友遇到过这个异常: No route info of th 约定不等于承诺〃/ 2022年02月23日 12:54/ 0 赞/ 915 阅读
相关 maven [INFO] No proxies configured [INFO] No proxy was configured, downloading directly maven [INFO] No proxies configured [INFO] No proxy was configured, downloading direct... 朱雀/ 2022年02月23日 01:55/ 5 赞/ 14517 阅读
相关 No route to host 使用telnet时报如下错误: [root@localhost zookeeper-3.4.14] telnet 192.168.158.129 3888 T 绝地灬酷狼/ 2022年02月19日 13:05/ 0 赞/ 206 阅读
相关 springmvc整合rocketMQ 解决问题:MQClientException: No route info of this topic, TopicTest 整合步骤 1. 下载rocketMq 启动(jdk1.8) 2. 创建生产者 3. 创建消费者 4. 测试 1、下载rocketMQ 与启动 去Apach 傷城~/ 2021年12月12日 16:15/ 0 赞/ 1465 阅读
相关 BUG-RocketMQ之sendDefaultImpl call timeout 和 No route info of this topic 运行环境 \[x\] MacOS Mojave10.14.3 \[x\] Java 1.8\_202 \[x\] RocketMQ 4.4.0 太过爱你忘了你带给我的痛/ 2021年09月09日 15:32/ 0 赞/ 227 阅读
还没有评论,来说两句吧...