Asynchronous Bean Initialization

Initializing a specific bean requires a network connection. This can take some time and without the need to block an already long start for several seconds.

Is there a way for my bean to signal that it has not yet been initialized even after it exits the constructor, and then when it is ready, it will inform the context that it is ready now, and this status should be moved to “initialized” .

+4
source share
1 answer

So, for Spring5x there is a task for non-lazy beans. Spring 5 is now, but the ticket is not yet allowed.

, . , Spring 5.

:

+1

Source: https://habr.com/ru/post/1665253/


All Articles