komawei opened a new issue #2707: Java Configuration example compile failure, 
field "column" no setter of class KeyGeneratorConfiguration
URL: https://github.com/apache/incubator-shardingsphere/issues/2707
 
 
   ## Bug Report
   
   **For English only**, other languages will not accept.
   
   Before report a bug, make sure you have:
   
   - Searched open and closed [GitHub 
issues](https://github.com/apache/incubator-shardingsphere/issues).
   - Read documentation: [ShardingSphere 
Doc](https://shardingsphere.apache.org/document/current/en/overview).
   
   Please pay attention on issues you submitted, because we maybe need more 
details. 
   If no response **more than 7 days** and we cannot reproduce it on current 
information, we will **close it**.
   
   Please answer these questions before submitting your issue. Thanks!
   
   ### Which version of ShardingSphere did you use?
   4.0.0.RC-1
   ### Which project did you use? Sharding-JDBC or Sharding-Proxy?
   Sharding-JDBC
   ### Expected behavior
   Compile success
   ### Actual behavior
   Compile failure.
   ### Reason analyze (If you can)
   1. 
   According to Java Configuration example below,
   [Java 
Configuration](https://shardingsphere.apache.org/document/current/cn/manual/sharding-jdbc/configuration/config-java/)
   
   ```
   private static KeyGeneratorConfiguration getKeyGeneratorConfiguration() {
           KeyGeneratorConfiguration result = new KeyGeneratorConfiguration();
           result.setColumn("order_id");
           return result;
       }
   ```
   
   the compilation is failed, cause KeyGeneratorConfiguration doesn't have the 
"column" setter at ver 4.0.0-RC1, and KeyGeneratorConfiguration doesn't have 
default constructor.
   
   2. method signature of ShardingDataSourceFactory@createDataSource not match 
Java Configuration example.
   
   example:
   return ShardingDataSourceFactory.createDataSource(createDataSourceMap(), 
shardingRuleConfig);
   
   acutal:
   ```
   public static DataSource createDataSource(Map<String, DataSource> 
dataSourceMap, ShardingRuleConfiguration shardingRuleConfig, Properties props) 
throws SQLException {
           return new ShardingDataSource(dataSourceMap, new 
ShardingRule(shardingRuleConfig, dataSourceMap.keySet()), props);
       }
   ```
   
   3. TableRuleConfiguration does not have default constructor.
   
   maybe some other classes have the same bug.
   
   ### Steps to reproduce the behavior, such as: SQL to execute, sharding rule 
configuration, when exception occur etc.
   just copy codes into IDE.
   ### Example codes for reproduce this issue (such as a github link).
   

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