Cause: java.lang.IllegalStateException: Missing the data source name: ‘null‘

mysql插入数据报错:

因为分库分表了,没有配

在nacos配置上就行了

spring:
  shardingsphere:
    sharding:
      tables:
        table_a:
          actual-data-nodes: ms-ds-$->{0..3}.table_a

 


版权声明:本文为keep12moving原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。