1) Configure Lifecycle Scenario
Bean metadata:
Bean: reportService
Type: ReportService
Scope: singleton
Callbacks: both
2) Lifecycle Mapping
- Container reads bean definition metadata.
- Bean instance is created based on scope.
- Dependencies are injected.
- Initialization callback runs.
- Business method executes during request.
- Destroy callback runs at context shutdown.