Spring Bean Lifecycle

Spring Bean Lifecycle

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: