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 2020/04/14 01:57:00 UTC

[GitHub] [incubator-shardingsphere] tristaZero commented on issue #5168: [DISCUSS] Simplify the configuration API of ShardingKeyGenerator on spring namespace

tristaZero commented on issue #5168: [DISCUSS]  Simplify the configuration  API of ShardingKeyGenerator on spring namespace
URL: https://github.com/apache/incubator-shardingsphere/issues/5168#issuecomment-613183666
 
 
   Hi I prefer the second one @kimmking mentioned, i.e,
   > <sharding:key-generator id="orderKeyGenerator" column="order_id"  type="INCREMENT" />
   
   Firstly, IMO, it is better to hide `org.apache.shardingsphere.shardingjdbc.spring.namespace.factorybean.KeyGenerateAlgorithmFactoryBean` which id internal class of ShardingSphere from user.
   Secondly, like the picture below shows, the beans of `ShardingAlgorithm` and `KeyGenerateAlgorithm` have a similar format but with a different meaning, which is likely to confuse the user.
   
   ![image](https://user-images.githubusercontent.com/27757146/79177433-5f922080-7e35-11ea-99f5-dd4d42d63c35.png)
   

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services