Documentation
¶
Index ¶
Constants ¶
const ( RefreshDefault = RefreshState(iota) Refreshing Refreshed )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Container ¶
type Container struct {
*resolving.Resolving
*injecting.Injecting
State RefreshState
}
Container is the core IoC container of the Go-Spring framework.
func (*Container) Refresh ¶
Refresh performs the full container lifecycle startup. The container processes application beans in two phases:
Resolving phase: Bean definitions are registered, configuration beans are scanned, conditions are evaluated, and inactive beans are filtered out.
Injecting phase: Dependencies are resolved and injected, and the final bean graph is constructed starting from the specified root beans.
After a successful refresh, resolving-phase metadata is discarded to reduce memory usage, and the container transitions to the Refreshed state.
Parameters:
- p: configuration storage used for property resolution.
- roots: root bean definitions that act as entry points for dependency injection.
Refresh should only be called once per container instance.
type RefreshState ¶ added in v1.3.0
type RefreshState int
RefreshState represents the lifecycle state of the container.