首页 > 其他分享 >【Spring】BeanFactory和FactoryBean有哪些区别

【Spring】BeanFactory和FactoryBean有哪些区别

时间:2023-02-27 20:13:05浏览次数:55  
标签:依赖 区别 Spring 哪些 Bean FactoryBean BeanFactory

 

 

区别

说实话,他俩除了名字比较像以外,好像没有其他共同点了。

「BeanFactory和FactoryBean有哪些区别?」

  1. BeanFactory是一个最基础的IOC容器,提供了依赖查找,依赖注入等基础的功能
  2. FactoryBean是创建Bean的一种方式,帮助实现复杂Bean的创建

和BeanFactory相关的还有一个高频的面试题

「ApplicationContext和BeanFactory有哪些区别?」

  1. BeanFactory是一个最基础的IOC容器,提供了依赖查找,依赖注入等基础的功能
  2. ApplicationContext继承了BeanFactory,在BeanFactory的基础上增加了企业级的功能,如AOP,资源管理(Resources)事件(Event),国际化(i18n),Environment抽象等

标签:依赖,区别,Spring,哪些,Bean,FactoryBean,BeanFactory
From: https://www.cnblogs.com/cuipengchong/p/17161687.html

相关文章

  • SpringBoot 搭建微服务初体验
    (SpringBoot搭建微服务初体验)前言大家好,微服务是现在面试中必不可少的一项技能了,掌握微服务,不仅能够加薪升职,还能在面试中,底气十足,不怯场,不怕被压薪资。所以今天就特意......
  • 【Spring】spring中创建bean的方式
    (181条消息)spring中创建bean的方式_清华大咖的博客-CSDN博客 (1)基于xml配置bean(2)使用@Component派生注解(3)使用@Configuration和@Bean注解1、常见的使用xml中set......
  • 【Spring】@Import注解
    (181条消息)@Import注解_ZmyCoder的博客-CSDN博客_@import 1、@Import注解须知@Import只能用在类上,@Import通过快速导入的方式实现把实例加入spring的IOC容器中......
  • springboot中redis使用和工具
    application.properties#Redis相关配置spring.data.redis.host=localhost#端口spring.data.redis.port=6379#reids数据库索引spring.data.redis.database=0Red......
  • springboot脱包部署
    <plugins><plugin><groupId>org.springframework.boot</groupId><artifactId>spring-boot-maven-plugin</artifactId><configuration>......
  • spring aop切面说明
    execution:处理JoinPoint的类型,例如call、execution(*android.app.Activity.on**(..)):这个是最重要的表达式,第一个*表示返回值,*表示返回值为任意类型,后面这个就是典型的......
  • springboot条件注册Condition注解
    环境识别importorg.springframework.context.annotation.Condition;importorg.springframework.context.annotation.ConditionContext;importorg.springframework.c......
  • 基于SpringBoot WebMagic爬虫爬取大乐透双色球
    大乐透网页地址:https://kjh.55128.cn/dlt-history-360.htm双色球网页地址:https://kjh.55128.cn/ssq-history-120.htm 注:程序仅用于个人兴趣爱好,不得用于商业行为,本......
  • SpringBoot项目打包部署
    转载自:https://blog.csdn.net/yw_2022/article/details/122649955========= SpringBoot项目打包在linux服务器中运行:jar类型项目会打成jar包:jar类型项目使用SpringBoo......
  • springcloud集成nacos(详细)
    一、什么是nacos官方:一个更易于构建云原生应用的动态服务发现、服务配置、和服务管理平台理解:注册中心(如:服务地址注册进去根据名称调用)、配置中心(如:每个服务yaml中的配置......