Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Component;

/**
* Demonstrates the use of {@link Lazy} to defer bean initialization until
* it is first requested.
*
* Lazy initialization can reduce application startup time and memory usage,
* but it introduces a proxy layer that may delay error detection until runtime.
*/
@Lazy
@Component
public class City {
Expand Down