Warning: Undefined array key "amp-addthis" in /home/tgagmvup/onlinestudy.guru/wp-content/plugins/addthis/backend/AddThisSharingButtonsFeature.php on line 101
lang="en-US"> Lazy initialization - onlinestudy.guru
Site icon onlinestudy.guru

Lazy initialization

By default when the application starts, all beans are initialized @Component, etc.

Spring will create an instance of it and make it available

Instead of creating all beans upfront, we can specify lazy initialization.

A bean will be initialized in the following case
It is needed dependency injection
or it is explicitly requested.
add @Lazy to the given class

Exit mobile version