Swoft designed its own container based on the PSR-11 specification and enhanced its functionality based on annotations.
A container is a huge factory for storing and managing the
What is a Bean
Swoft is a generic term for an object instance of a class in.
Swoft , the object that makes up the application trunk and
Swoft is managed by the IOC container is called
Swoft An object that is instantiated, assembled, and managed by an IOC container.
IOCA container can be seen as a
Beans collection of relationships
beanIs an object, one or more unqualified
SwoftManaged by one of
IOCthe things called in
- Our applications are made up of individual
BeanFactoryProvides an advanced configuration mechanism to manage any kind of bean.
The definition of a bean should be
BeanDefinition described: when
注解 is parsed, it is converted internally into an
BeanDefinition object. The next operation is done on this object.
Which are beans?
Beans are not equal to ' @Bean ', although in most cases they refer to the same thing.
As follows, all class annotation tags of the class, put into the container can be called Bean objects.
Class annotations, such as:
@BeanMost commonly used bean annotations
- Wait a minute...