配置mycat 取模范围约束分片报错信息:
Caused by: Java.lang.ClassNotFoundException: org.opencloudb.route.function.PartitionByPattern
是因为这个1.6版本做了改动,对应的。jar文件在io.mycat.route.function.PartitionByPattern下
所以function 这么写:
<function name="sharding-by-prifixpattern" class="io.mycat.route.function.PartitionByPattern"> <property name="patternValue">8</property> <property name="prefixLength">1</property> <property name="mapFile">partition-pattern.txt</property> </function>
修改后正常启动。