郑州网站搭建,联想网站建设摘要,手机网站设计通用尺寸,太原百度做网站多少钱shardingphere Sharding count cannot be null解决方案 问题背景解决方案Lyric#xff1a; 我知道坚持要走 问题背景
使用shardingphere分表分库时#xff0c;出现分表算法设置错误
Caused by: java.lang.IllegalArgumentException: Sharding count cannot be null.at com.… shardingphere Sharding count cannot be null解决方案 问题背景解决方案Lyric 我知道坚持要走 问题背景
使用shardingphere分表分库时出现分表算法设置错误
Caused by: java.lang.IllegalArgumentException: Sharding count cannot be null.at com.google.common.base.Preconditions.checkArgument(Preconditions.java:142)at org.apache.shardingsphere.sharding.algorithm.sharding.mod.ModShardingAlgorithm.getShardingCount(ModShardingAlgorithm.java:52)at org.apache.shardingsphere.sharding.algorithm.sharding.mod.ModShardingAlgorithm.init(ModShardingAlgorithm.java:48)at org.apache.shardingsphere.spring.boot.registry.AbstractAlgorithmProvidedBeanRegistry.postProcessAfterInitialization(AbstractAlgorithmProvidedBeanRegistry.java:98)at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsAfterInitialization(AbstractAutowireCapableBeanFactory.java:431)at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1800)at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:595)... 200 common frames omitted
2023-11-03 13:48:14.179 INFO [main][] c.a.d.p.DruidDataSource.init(DruidDataSource.java:998): {dataSource-2,master} inited
2023-11-03 13:48:14.179 INFO [main][] c.b.d.d.DynamicRoutingDataSource.addDataSource(DynamicRoutingDataSource.java:148): dynamic-datasource - add a datasource named [sharding] success
2023-11-03 13:48:14.180 INFO [main][] c.b.d.d.DynamicRoutingDataSource.addDataSource(DynamicRoutingDataSource.java:148): dynamic-datasource - add a datasource named [master] success
2023-11-03 13:48:14.180 INFO [main][] c.b.d.d.DynamicRoutingDataSource.afterPropertiesSet(DynamicRoutingDataSource.java:228): dynamic-datasource initial loaded [2] datasource,primary datasource named [master]解决方案
shardingphere5.1.1版本之前是不能使用下划线 _ 的5.1.1版本可以使用下划线 如果使用5.0.0版本就使用alg-mod
spring.shardingsphere.rules.sharding.sharding-algorithms.alg-mod.props.sharding-count2048如果使用5.1.1版本可以使用alg_mod也可以使用alg-mod
spring.shardingsphere.rules.sharding.sharding-algorithms.alg_mod.props.sharding-count2048作为程序员第 249 篇文章每次写一句歌词记录一下看看人生有几首歌的时间wahahaha …
Lyric 我知道坚持要走