monkeymada commented on issue #10952:
URL:
https://github.com/apache/shardingsphere/issues/10952#issuecomment-867421702
Refer to the document configuration but always report an error:
Caused by:
org.apache.shardingsphere.infra.spi.exception.ServiceProviderNotFoundException:
No implementation class load from SPI
`org.apache.shardingsphere.sharding.spi.ShardingAlgorithm` with type
`CLASS_BASED`.
Configuration details:
#sharding-jdbc
#spring.shardingsphere.datasource.names=ds1,ds2
spring.shardingsphere.datasource.common.type=com.alibaba.druid.pool.DruidDataSource
spring.shardingsphere.datasource.common.driver-class-name=com.mysql.jdbc.Driver
spring.shardingsphere.datasource.common.username=admin
spring.shardingsphere.datasource.common.password=123456
spring.shardingsphere.datasource.ds1.jdbc-url=jdbc:mysql://localhost:3306/my_sql?serverTimezone=UTC&useSSL=false
spring.shardingsphere.datasource.ds2.jdbc-url=jdbc:mysql://localhost:3306/my_sql?serverTimezone=UTC&useSSL=false
# 用于Hint 的分片策略
spring.shardingsphere.rules.sharding.tables.t_order.actual-data-nodes=ds${1..2}.t_order
spring.shardingsphere.rules.sharding.tables.t_order.database-strategy.hint.hint-test.sharding-algorithm-name=hint-test
spring.shardingsphere.rules.sharding.sharding-algorithms.hint-test.type=CLASS_BASED
spring.shardingsphere.rules.sharding.sharding-algorithms.hint-test.props.strategy=HINT
spring.shardingsphere.rules.sharding.sharding-algorithms.hint-test.props.algorithmClassName=com.shardingjdbc.test.DatabaseHintShardingKeyAlgorithm
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]