WebX学习记录一

近段时间学习淘宝开源框架WebX。

对扩展点,Configuration Point  ;捐献,Contribution

是如何初始化加载的进行学习

    @Override
    protected void initBeanDefinitionReader(XmlBeanDefinitionReader beanDefinitionReader) {
        new XmlBeanDefinitionReaderProcessor(beanDefinitionReader).addConfigurationPointsSupport();
    }
  
addConfigurationPointsSupport{
SpringExtSchemaSet schemas = new SpringExtSchemaSet(classLoader);
}
 
/** 通过指定的<code>ClassLoader</code>来装载schemas。 */
    public SpringExtSchemaSet(ClassLoader classLoader) {
        this(new ConfigurationPointsImpl(classLoader), new SpringPluggableSchemas(classLoader));
}
 
    private ConfigurationPointsImpl(ClassLoader classLoader, ResourceResolver resourceResolver, String configurationPointsLocation) {
        this.configurationPointsLocation = defaultIfEmpty(configurationPointsLocation, DEFAULT_CONFIGURATION_POINTS_LOCATION);
    }
 
String DEFAULT_CONFIGURATION_POINTS_LOCATION = "META-INF/spring.configuration-points";
 到此是加载扩展点完毕,接下来是深入探讨加载 spring.configuration-points后如何到底如何扩展的
以及如何加载捐献点和 Schema的。

猜你喜欢

转载自lcgg110.iteye.com/blog/1943178
今日推荐