TaoZhiMLND commented on issue #1977: make key-generator and encryptor strategy 
as a spring bean on spring namespace
URL: 
https://github.com/apache/incubator-shardingsphere/issues/1977#issuecomment-603988361
 
 
   After the discussion with @cherrylzhao, we decide make key-generator as a 
spring bean on spring namespace in the following steps:
   
   - [✓] change `shardingNamespace.xml` configuration.
   
   - [✓] create class `KeyGeneratorFactoryBean` extends 
`TypeBasedSPIConfiguration`  implements 
`FactoryBean<ShardingKeyGenerator>`,leverage `FactoryBean` to create 
KeyGenerator.
   
   - [✓] modify class `KeyGeneratorConfiguration`~~extends 
TypeBasedSPIConfiguration~~,add member variables `ShardingKeyGenerator 
keyGenerator`.
   
   - [✓] modify class `KeyGeneratorBeanDefinitionParser` 
addConstructorArgReference with `KeyGenerator` by using TAG `generator-ref`.
   
   - [✓] modify class `TableRule`, 
shardingKeyGenerator=tableRuleConfig.getKeyGeneratorConfig().getKeyGenerator().
   
   - [✓] modify class `ShardingRule`, use 
keyGeneratorConfiguration.getKeyGenerator() instead of create by 
ShardingKeyGeneratorServiceLoader.
   
   - [✓] modify correlative tests, add test on `ShardingKeyGenerator` Bean.
   
   - [  ] modify docs and examples.
   
   I'll commit a pr.

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