第六章 DI 与生命周期
本章讲解依赖注入与服务生命周期管理。
本章小节
| 小节 | 内容 |
|---|---|
| ServiceCollection 与服务注册 | 容器基础 |
| 依赖注入模式 | inject、手动注册 |
| IHostedService 后台服务 | 启动/关闭钩子 |
| 模块系统与 inject 宏 | rust-dix 模块 |
下一步
从 ServiceCollection 与服务注册 开始。
Press ← or → to navigate between chapters
Press S or / to search in the book
Press ? to show this help
Press Esc to hide this help
本章讲解依赖注入与服务生命周期管理。
| 小节 | 内容 |
|---|---|
| ServiceCollection 与服务注册 | 容器基础 |
| 依赖注入模式 | inject、手动注册 |
| IHostedService 后台服务 | 启动/关闭钩子 |
| 模块系统与 inject 宏 | rust-dix 模块 |
从 ServiceCollection 与服务注册 开始。