You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2022/09/03 13:06:29 UTC
[GitHub] [shardingsphere] strongyc opened a new issue, #20751: 启动报错
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: notifications-unsubscribe@shardingsphere.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] strongyc closed issue #20751: 启动报错
Posted by GitBox <gi...@apache.org>.
strongyc closed issue #20751: 启动报错
URL: https://github.com/apache/shardingsphere/issues/20751
--
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] terrymanu commented on issue #20751: 启动报错
Posted by GitBox <gi...@apache.org>.
terrymanu commented on issue #20751:
URL: https://github.com/apache/shardingsphere/issues/20751#issuecomment-1270301046
**For English only**, other languages will not accept.
--
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org