Spring Bean Lifecycle with Executable Code

Spring Bean Lifecycle with Executable Code

Lifecycle code example

Executing above code, the printed messages would show in console in order as their number marks, which is exactly same as lifecycle image shows.

above-mentioned LifeCycleDemoBeanPostProcessor: