mumutu66 commented on issue #18093:
URL: 
https://github.com/apache/shardingsphere/issues/18093#issuecomment-1221521809

   I think  the datasource bean may not use the beanPostProcessor to init。。In 
some case other lib will use a beanPostProcessor which depends on  the 
datasource  will trigger the bean initialize during the 
`org.springframework.context.support.PostProcessorRegistrationDelegate#registerBeanPostProcessors(org.springframework.beans.factory.config.ConfigurableListableBeanFactory,
 org.springframework.context.support.AbstractApplicationContext)` and the 
datasource bean will missing the init phase . maybe use the 
`SmartInitializingSingleton` instead。。or just init right on the ` 
BeanDefinitionBuilder builder = 
BeanDefinitionBuilder.genericBeanDefinition(ShardingSphereAlgorithmFactory.createAlgorithm(algorithmConfig,
 algorithmClass).getClass());`  


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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to