• 2023-12-05一、Spring学习 : 容器---->BeanFactory+ApplicationContext 的多种容器实现
    BeanFactory实现的特点我们来着重讲一下DefaultListableBeanFactory这个实现类:点击查看完整代码packagecom.itvayne.springbootcloudstudy.beanfactory01;importcom.sun.org.slf4j.internal.Logger;importcom.sun.org.slf4j.internal.LoggerFactory;importorg.springf
  • 2023-10-12SpringBoot获取Bean的工具类
    1、beanName默认是类名首字母小写下面的类:beanName=bean1@ComponentpublicclassBean1{publicStringgetBean1(){return"Bean1";}}修改beanName下面的类:beanName=bean2New@Component("bean2New")publicclassBean2{
  • 2023-04-03Spring从熟悉到陌生
    BeanFactory与ApplicationContext的区别与联系在SpringBoot项目中我们通过SpringApplication.run(SpringLearnApplication.class,args);来启动项目,实际上这个方法有一个返回值,类型为ConfigurableApplicationContext,类图关系如下。可以看到它实现了ApplicationContext接口,而Ap
  • 2022-10-2501.BeanFactory实现
    /**beanFactory不会做的事:*1.不会主动调用BeanFactory后处理器*2.不会主动添加Bean后处理器*3.不会主动初始化单例(懒加载)*4.不会解析beanFactory还不会解析
  • 2022-08-16Spring 高级 AutowiredAnnotationBeanPostProcessor 运行分析
    1、AutowiredAnnotationBeanPostProcessor运行分析AutowiredAnnotationBeanPostProcessor的作用:AutowiredAnnotationBeanPostProcessor解析@Autowired与@Value----