@Lazy at injection point

Turns out when spring inject the bean with `@Lazy annotation, it's actually not delaying` the bean initialization, which is separately controlled at the @Bean or @Configuration level.

the injection point is instead creating a proxy object, with all attributes nulled, and for the methods, it will direct to the actual bean.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s