ben905713861 edited a comment on issue #8183:
URL: https://github.com/apache/shardingsphere/issues/8183#issuecomment-728959920


   thanks @dongzl I have slove this problem.In sharding-5+, we can not write 
classname in sharding config,we should use the newest SPI style to add a 
customer configuation in sharding-proxy-5.0.0
   ```
   rules:
   - !SHARDING
     tables:
       wx_user:
         actualDataNodes: huodong-user.wx_user_${0..2}
         tableStrategy:
           complex:
             shardingColumns: wxId,openId
             shardingAlgorithmName: wx_user_complex
         keyGenerateStrategy:
           column: wxUserId
           keyGeneratorName: snowflake
     shardingAlgorithms:
       wx_user_complex:
         type: WxUserShardingAlgorithm
   ```
   Here is the demo to introduce how to use the SPI style in 
sharding-proxy-5.0.0:
   
[https://github.com/ben905713861/sharding5-spi-demo](https://github.com/ben905713861/sharding5-spi-demo)


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


Reply via email to