spring 容器注册bean , 会把bean包装成beanDefinition 放进spring容器中,beanDefinitionLoader就是加载bean的类 。一、源码class BeanDefinitionLoader { private final Object[] sources; private final AnnotatedBeanDefinitionRead
Spring Boot 源码分析 (3) -- BeanDefinitionLoader分析在上一篇中我们分析了SpringBootApplication的启动过程,在启动过程中通过调用BeanDefinitionLoader的load()方法来加载sources资源,也就是Application.class类。为了直观起见,还是将之前的示例写出来。@SpringBootApplication p
转载 2024-07-05 14:28:25
0阅读
在上一篇中我们分析了SpringBootApplication的启动过程,在启动过程中通过调用BeanDefinitionLoader的load()方法来加载sources资源,也就是Application.class类。为了直观起见,还是将之前的示例写出来。@SpringBootApplication public class Application { /** * 启动Spring Bo