kuangziyang commented on issue #32166: URL: https://github.com/apache/shardingsphere/issues/32166#issuecomment-2461751410
shardingsphere的一个坑来的,初始化的时候Shardingsphere会将你设置的表从数据库加载元数据加载到内存中,每次执行sql时都要校验你查询的表在内存中是否存在元数据,不存在则会抛出异常。你需要做以下设置便可: // 设置ShardingDataSource表范围: "dataSourceName.*" SingleRuleConfiguration singleRuleConfiguration = new SingleRuleConfiguration(); singleRuleConfiguration.getTables().add(datasourceName + ".*"); singleRuleConfiguration.setDefaultDataSource(datasourceName); -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
