Introduction
We know that IOC(Inversion of Control) is an effective architectural design for system decoupling, and is also a supporting tool for the development of large-scale business systems
IOC Containers
There are two types of ioc containers in Vona:
app container: During system initialization, a unique global bean container will be automatically created. Bean instances created in this container are all singleton modectx container: When requests coming, the system will create a bean container for each of them
Bean Class
Vona adopts a modular system, and Bean Classes are provided by different modules
Injection Scope
Vona provides the following injection scopes:
app: Inject in the app containerctx: Inject in the ctx containernew: Always create a new bean instance
Injection method
Vona provides two injection methods:
Dependency injection: Provides attribute-based dependency injection through the@UsedecoratorDependency lookup: Directly lookup the required bean instance through the ioc container, and automatically create it if it does not exist