strongyc opened a new issue, #20751:
URL: https://github.com/apache/shardingsphere/issues/20751

   org.springframework.beans.factory.BeanCreationException: Error creating bean 
with name 
'org.apache.shardingsphere.spring.boot.ShardingSphereAutoConfiguration': 
Initialization of bean failed; nested exception is 
java.lang.NullPointerException: Cannot invoke "Object.toString()" because the 
return value of "java.util.Map.get(Object)" is null
   java17 
   springboot 2.7.3
   #主从复制+分表
   spring:
     shardingsphere:
       datasource:
         names: master0,master0slave0
         master0:
           dataSourceClassName: com.zaxxer.hikari.HikariDataSource
           driverClassName: com.mysql.cj.jdbc.Driver
           jdbcUrl: 
jdbc:mysql://192.168.37.130:3306/mytbl?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
           username: root
           password: toor1123@
         master0slave0:
           dataSourceClassName: com.zaxxer.hikari.HikariDataSource
           driverClassName: com.mysql.cj.jdbc.Driver
           jdbcUrl: 
jdbc:mysql://192.168.37.132:3306/mytbl?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
           username: root
           password: toor1123@
       rules:
         readwrite-splitting: # 读写分离规则
           data-sources: # 数据源配置
             random: # 这个名字随便起
               type: Static                               # 静态类型
               load-balancer-name: round_robin            # 负载均衡算法名字
               props:
                 write-data-source-name: master0          # 写数据源
                 read-data-source-names: master0slave0            # 读数据源
           load-balancers: # 负载均衡配置
             round_robin: # 跟上面负载均衡算法的名字对应
               type: ROUND_ROBIN                          # 负载均衡算法
         sql:
           show: true #显示sql
   


-- 
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]

Reply via email to