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 2019/07/22 05:06:38 UTC

[GitHub] [incubator-shardingsphere] tristaZero commented on issue #2707: Java Configuration example compile failure, field "column" no setter of class KeyGeneratorConfiguration

tristaZero commented on issue #2707: Java Configuration example compile failure, field "column" no setter of class KeyGeneratorConfiguration
URL: https://github.com/apache/incubator-shardingsphere/issues/2707#issuecomment-513641820
 
 
   @komawei 
   Hi, sorry, the official document give a bad example, can you fix this bug and raise a pr for [official ducument](https://github.com/apache/incubator-shardingsphere-doc)?
   The correct way to initialize KeyGeneratorConfiguration is
   ```
   public final class KeyGeneratorConfiguration extends TypeBasedSPIConfiguration {
       
       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;
       }
       
       public KeyGeneratorConfiguration(final String type, final String column, final Properties properties) {
           super(type, properties);
           Preconditions.checkArgument(!Strings.isNullOrEmpty(column), "Column is required.");
           this.column = column;
       }
   ```

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