shardingsphere-features/shardingsphere-shadow/shardingsphere-shadow-spring/shardingsphere-shadow-spring-namespace/src/main/java/org/apache/shardingsphere/shadow/spring/namespace/parser/ShadowRuleBeanDefinitionParser.java
/**
     * Parse shadow rule element.
     *
     * @param element element
     * @return bean definition of shadow rule
     */
Parse shadow rule element.
@param element element
@return bean definition of shadow rule
Parse shadow rule element . @param element element @return bean definition of shadow rule
@Override
    protected AbstractBeanDefinition parseInternal(final Element element, final ParserContext parserContext) {
        BeanDefinitionBuilder factory = BeanDefinitionBuilder.rootBeanDefinition(AlgorithmProvidedShadowRuleConfiguration.class);
        factory.addPropertyValue("enable", parseShadowEnableConfiguration(element));
        factory.addPropertyValue("dataSources", parseDataSourcesConfiguration(element));
        factory.addPropertyValue("tables", parseShadowTablesConfiguration(element));
        factory.addPropertyValue("shadowAlgorithms", ShardingSphereAlgorithmBeanRegistry.getAlgorithmBeanReferences(parserContext, ShadowAlgorithmFactoryBean.class));
        return factory.getBeanDefinition();
    }
@ Override protected AbstractBeanDefinition parseInternal ( final Element element , final ParserContext parserContext ) { BeanDefinitionBuilder factory = BeanDefinitionBuilder . rootBeanDefinition ( AlgorithmProvidedShadowRuleConfiguration . class ) ; factory . addPropertyValue ( "enable" , parseShadowEnableConfiguration ( element ) ) ; factory . addPropertyValue ( "dataSources" , parseDataSourcesConfiguration ( element ) ) ; factory . addPropertyValue ( "tables" , parseShadowTablesConfiguration ( element ) ) ; factory . addPropertyValue ( "shadowAlgorithms" , ShardingSphereAlgorithmBeanRegistry . getAlgorithmBeanReferences ( parserContext , ShadowAlgorithmFactoryBean . class ) ) ; return factory . getBeanDefinition ( ) ; }
Parse shadow rule element.
Parse shadow rule element .