当前位置:网站首页>Differences between beanfactory and factorybean
Differences between beanfactory and factorybean
2022-06-30 04:24:00 【No bug program yuan】
Both of them are factories , but FactoryBean It's still essentially one Bean, Also return BeanFactory management
BeanFactory yes Spring The top interface of the container ,FactoryBean More similar to user-defined factory interface .
BeanFactory: With Factory ending , Indicates that it is a factory class ( Interface ), It is responsible for production and management bean A factory of . stay Spring in ,BeanFactory yes IOC The core interface of the container , Its duties include : Instantiation 、 location 、 Configuring objects in an application and establishing dependencies between them .BeanFactory It's just an interface , Not at all IOC The concrete implementation of the container , however Spring Containers offer many implementations , Such as DefaultListableBeanFactory、XmlBeanFactory、ApplicationContext etc. , among XmlBeanFactory It's a commonly used one , The implementation will use XML Method describes the objects that make up the application and the dependencies among them .XmlBeanFactory Class will hold this XML Configuration metadata , And use it to build a fully configurable system or application .
FactoryBean: It's a Bean. stay Spring in , be-all Bean It's all by BeanFactory( That is to say IOC Containers ) To manage . But yes FactoryBean for , This Bean It's not simple Bean, It's a factory that can produce or decorate object generation Bean, Its implementation is similar to the factory pattern and decorator pattern in the design pattern
边栏推荐
- Explain the underlying principles of JVM garbage collection in simple terms
- 节点CODE相同会导致数据重复
- About manipulator on Intelligent Vision Group
- 工程安全和工程质量
- Redis sentry, persistence, master-slave, hand tear LRU
- I spent three years in a big factory outsourcing, which subverted my understanding!
- SQL error caused by entity class: Oracle "ora-00904" error: possible case of invalid identifier
- Idea grey screen problem
- Imile uses Zadig's multi cloud environment to deploy thousands of times a week to continuously deliver global business across clouds and regions
- The same node code will cause duplicate data
猜你喜欢

FortiGate firewall configuration log uploading regularly

深度融合云平台,对象存储界的“学霸”ObjectScale来了

Slam mapping, automatic navigation and obstacle avoidance based on ROS (bingda robot)

I spent three years in a big factory outsourcing, which subverted my understanding!

管道实现进程间通信之命名管道

Grasp grpc communication framework in simple terms
![Tea mall system based on SSM framework [project source code + database script + report]](/img/d9/0a46c0da9839a7186bd3a9ae55f0a5.png)
Tea mall system based on SSM framework [project source code + database script + report]

Anonymous pipeline for interprocess communication

Day 11 script and game AI

lego_ Reading and summary of loam code
随机推荐
[learn FPGA programming from scratch -52]: high level chapter - FPGA development based on IP core - basic framework for IP core use (taking PLL as an example)
Slam mapping, automatic navigation and obstacle avoidance based on ROS (bingda robot)
JS import and export
Five methods to clear floating and their advantages and disadvantages
Quick sort & merge sort
Explain the underlying principles of JVM garbage collection in simple terms
知识点滴 - 如何用3个简单的技巧在销售中建立融洽的关系
Everyone, Flink 1.13.6, mysql-cdc2.2.0, the datetime (6) class extracted
基于servlet+jsp+mysql实现的工资管理系统【源码+数据库】
How to write a conditional statement to obtain the value of the maximum time in a table using a MySQL statement
在大厂外包呆了三年,颠覆了我的认知!
Introduction to cloud native + container concept
How to use div boxes to simulate line triangles
I spent three years in a big factory outsourcing, which subverted my understanding!
7-3 打怪升级 单源最短路
What is the difference between synchronized and lock
Huawei cloud native - data development and datafactory
DBT product initial experience
AI落地的新范式,就“藏”在下一场软件基础设施的重大升级里
Error in conditional filter (if) syntax in sum function in SQL Server2005