SpringBoot中Spring如何自动创建Bean对象

Bean对象:在Spring中交给Spring自动创建,不需要我们手动去new,所创建的对象,都叫Bean对象。 Spring怎么知道什么对象应该交给他创建呢?类的字节码对象上有注解注释时,他所需要创建的对象,都交给spring创建。 我们知道,Spring帮我们自动创建Bean对象,那么spring底层是如何执行的呢? 1.启动SpringBoot,读取SpringBoot下字节码对象,反射找到
相关文章
相关标签/搜索