Spring Boot源码01-AnnotationConfigServletWebServerApplicationContext的子子孙孙

层级结构

class AnnotationConfigServletWebServerApplicationContext extends ServletWebServerApplicationContext implements AnnotationConfigRegistry class ServletWebServerApplicationContext extends GenericWebApplicationContext implements ConfigurableWebServerApplicationContext class GenericWebApplicationContext extends GenericApplicationContext implements ConfigurableWebApplicationContext, ThemeSource GenericApplicationContext extends AbstractApplicationContext implements BeanDefinitionRegistry abstract class AbstractApplicationContext extends DefaultResourceLoader class DefaultResourceLoader implements ResourceLoader interface ResourceLoader interface BeanDefinitionRegistry extends AliasRegistry interface AliasRegistry interface ConfigurableWebApplicationContext extends WebApplicationContext, ConfigurableApplicationContext interface WebApplicationContext extends ApplicationContext interface ApplicationContext extends EnvironmentCapable, ListableBeanFactory, HierarchicalBeanFactory,MessageSource, ApplicationEventPublisher, ResourcePatternResolver interface EnvironmentCapable interface ListableBeanFactory extends BeanFactory interface BeanFactory interface HierarchicalBeanFactory extends BeanFactory interface MessageSource @FunctionalInterface public interface ApplicationEventPublisher interface ResourcePatternResolver extends ResourceLoader interface ConfigurableApplicationContext extends ApplicationContext, Lifecycle, Closeable interface Lifecycle interface Closeable extends AutoCloseable interface AutoCloseable interface ThemeSource interface ConfigurableWebServerApplicationContext extends ConfigurableApplicationContext, WebServerApplicationContext interface WebServerApplicationContext extends ApplicationContext interface AnnotationConfigRegistry

方法归属

interface ConfigurableWebServerApplicationContext extends ConfigurableApplicationContext, WebServerApplicationContext {
        void setServerNamespace(String serverNamespace);

    interface ConfigurableApplicationContext extends ApplicationContext, Lifecycle, Closeable void setId(String id); void setParent(@Nullable ApplicationContext parent); void setEnvironment(ConfigurableEnvironment environment); void addBeanFactoryPostProcessor(BeanFactoryPostProcessor postProcessor); void addApplicationListener(ApplicationListener<?> listener); void addProtocolResolver(ProtocolResolver resolver); void refresh() throws BeansException, IllegalStateException; void registerShutdownHook(); boolean isActive(); ConfigurableListableBeanFactory getBeanFactory() throws IllegalStateException; interface WebServerApplicationContext extends ApplicationContext WebServer getWebServer(); String getServerNamespace(); interface ThemeSource @Nullable Theme getTheme(String themeName); abstract class AbstractApplicationContext extends DefaultResourceLoader public void setDisplayName(String displayName) public AbstractApplicationContext() public AbstractApplicationContext(@Nullable ApplicationContext parent) interface ConfigurableWebServerApplicationContext extends ConfigurableApplicationContext, WebServerApplicationContext void setServerNamespace(String serverNamespace); interface ApplicationContext extends EnvironmentCapable, ListableBeanFactory, HierarchicalBeanFactory,MessageSource, ApplicationEventPublisher, ResourcePatternResolver @Nullable String getId(); long getStartupDate(); @Nullable ApplicationContext getParent(); AutowireCapableBeanFactory getAutowireCapableBeanFactory() throws IllegalStateException; interface EnvironmentCapable Environment getEnvironment(); interface ListableBeanFactory extends BeanFactory interface BeanFactory interface ResourceLoader Resource getResource(String location); @Nullable ClassLoader getClassLoader(); interface ResourcePatternResolver extends ResourceLoader Resource[] getResources(String locationPattern) throws IOException; interface WebApplicationContext extends ApplicationContext void setId(String id); void setParent(@Nullable ApplicationContext parent); void setEnvironment(ConfigurableEnvironment environment); @Override ConfigurableEnvironment getEnvironment(); void addBeanFactoryPostProcessor(BeanFactoryPostProcessor postProcessor); void addApplicationListener(ApplicationListener<?> listener); void addProtocolResolver(ProtocolResolver resolver); void refresh() throws BeansException, IllegalStateException; void registerShutdownHook(); @Override void close(); boolean isActive(); ConfigurableListableBeanFactory getBeanFactory() throws IllegalStateException; interface ListableBeanFactory extends BeanFactory boolean containsBeanDefinition(String beanName); beans defined in the factory int getBeanDefinitionCount(); String[] getBeanDefinitionNames(); String[] getBeanNamesForType(ResolvableType type); String[] getBeanNamesForType(@Nullable Class<?> type); String[] getBeanNamesForType(@Nullable Class<?> type, boolean includeNonSingletons, boolean allowEagerInit); <T> Map<String, T> getBeansOfType(@Nullable Class<T> type) throws BeansException; <T> Map<String, T> getBeansOfType(@Nullable Class<T> type, boolean includeNonSingletons, boolean allowEagerInit) throws BeansException; String[] getBeanNamesForAnnotation(Class<? extends Annotation> annotationType); Map<String, Object> getBeansWithAnnotation(Class<? extends Annotation> annotationType) throws BeansException; @Nullable <A extends Annotation> A findAnnotationOnBean(String beanName, Class<A> annotationType) throws NoSuchBeanDefinitionException; interface BeanFactory Object getBean(String name) throws BeansException; <T> T getBean(String name, @Nullable Class<T> requiredType) throws BeansException; Object getBean(String name, Object... args) throws BeansException; <T> T getBean(Class<T> requiredType) throws BeansException; <T> T getBean(Class<T> requiredType, Object... args) throws BeansException; boolean containsBean(String name); boolean isSingleton(String name) throws NoSuchBeanDefinitionException; boolean isPrototype(String name) throws NoSuchBeanDefinitionException; boolean isTypeMatch(String name, ResolvableType typeToMatch) throws NoSuchBeanDefinitionException; boolean isTypeMatch(String name, @Nullable Class<?> typeToMatch) throws NoSuchBeanDefinitionException; @Nullable Class<?> getType(String name) throws NoSuchBeanDefinitionException; String[] getAliases(String name); interface HierarchicalBeanFactory extends BeanFactory @Nullable BeanFactory getParentBeanFactory(); boolean containsLocalBean(String name); interface MessageSource @Nullable String getMessage(String code, @Nullable Object[] args, @Nullable String defaultMessage, Locale locale); String getMessage(String code, @Nullable Object[] args, Locale locale) throws NoSuchMessageException; String getMessage(MessageSourceResolvable resolvable, Locale locale) throws NoSuchMessageException; @FunctionalInterface public interface ApplicationEventPublisher default void publishEvent(ApplicationEvent event) {
            publishEvent((Object) event);
        }
        void publishEvent(Object event);

    interface AnnotationConfigRegistry void register(Class<?>... annotatedClasses); void scan(String... basePackages);
    原文作者:Spring Boot
    原文地址: https://blog.csdn.net/wwHRestarting/article/details/79622376
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞