依赖注入支持
无
此模块没有配置项
挂载项 | 类型 | 功能 |
---|---|---|
injector | Injector | singleton 作用域注入管理器 |
挂载项 | 类型 | 功能 |
---|---|---|
injector | Injector | request 作用域注入管理器 |
名称 | 功能 |
---|---|
@component | 组件类的构造参数注入 |
@init | 初始化方法 |
@inject | 属性注入 (不推荐使用,使用 @component 代替) |
方法 | 功能 |
---|---|
$getInstance(target: Class) | 取得对象实例,对象实例会优先从 request 层获取,没有请求上下文则从 singleton 层获取 |