TaoZhiMLND commented on a change in pull request #4945: make key-generator as a 
spring bean on spring namespace.
URL: 
https://github.com/apache/incubator-shardingsphere/pull/4945#discussion_r399813872
 
 

 ##########
 File path: 
sharding-core/sharding-core-api/src/main/java/org/apache/shardingsphere/api/config/sharding/KeyGeneratorConfiguration.java
 ##########
 @@ -20,27 +20,21 @@
 import com.google.common.base.Preconditions;
 import com.google.common.base.Strings;
 import lombok.Getter;
-import 
org.apache.shardingsphere.underlying.common.config.TypeBasedSPIConfiguration;
-
-import java.util.Properties;
+import org.apache.shardingsphere.spi.keygen.ShardingKeyGenerator;
 
 /**
  * Key generator configuration.
 */
 @Getter
-public final class KeyGeneratorConfiguration extends TypeBasedSPIConfiguration 
{
+public final class KeyGeneratorConfiguration {
     
     private final String column;
     
-    public KeyGeneratorConfiguration(final String type, final String column) {
-        super(type);
-        Preconditions.checkArgument(!Strings.isNullOrEmpty(column), "Column is 
required.");
-        this.column = column;
-    }
+    private final ShardingKeyGenerator keyGenerator;
 
 Review comment:
   > here we should rename ShardingKeyGenerator SPI to KeyGenerateAlgorithm.
   > Be care about modifying all sub class of ShardingKeyGenerator
   
   ShardingKeyGenerator has renamed to KeyGenerateAlgorithm.

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


With regards,
Apache Git Services

Reply via email to