Spring Bean 创建(2)

1. 入口

AnnotationConfigApplicationContext annotationConfigApplicationContext = new AnnotationConfigApplicationContext(
    AppConfig.class);

 

1.1. spring 构造器

public AnnotationConfigApplicationContext(Class<?>... componentClasses) {
    this();
    this.register(componentClasses);
    this.refresh();
}

1.2. 流程

 
posted @ 2025-12-11 17:59  Hxf_007  阅读(3)  评论(0)    收藏  举报