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/07/07 09:47:30 UTC

[GitHub] [shardingsphere] linghengqian commented on issue #18927: I try to use custom sharding

linghengqian commented on issue #18927:
URL: https://github.com/apache/shardingsphere/issues/18927#issuecomment-1177328857

   - I think your custom `CLASS_BASE` class is written incorrectly, you don't need to `@Component`, you actually just need to mark the `final` class. Unless you have registered SPI, you don't need to override `getType` to a value other than `null`. You can refer to it  https://github.com/apache/shardingsphere/blob/5.1.0/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/fixture/ClassBasedStandardShardingAlgorithmFixture.java . 
   
   - Incidentally, I can't reproduce your question in ShardingSphere 5.1.2. I think you should update the dependencies first.


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