shardingsphere启动报mode错误
错误关键位置:
Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'org.apache.shardingsphere.infra.config.mode.ModeConfiguration' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {}
解决:
配置文件中增加:
spring.shardingsphere.mode.type=Memory
如果是高版本,mode.type已经不支持 Memory配置,需要使用 Standalone 或 Cluster,Standalone单机模式,Cluster 集群模式,不配置则默认使用单机模式。
官网文档说明:模式配置 :: ShardingSphere