Concept Flow - Field injection and why to avoid it
Start: Spring creates bean
Inject dependencies via fields
Bean ready to use
Problems arise: hard to test, hidden dependencies
Better: use constructor injection
Clear dependencies, easier testing, immutable fields
Spring creates a bean and injects dependencies directly into fields, which works but causes hidden problems. Using constructor injection instead makes dependencies clear and testing easier.