Question d’entretien chez Synechron

How to call a function before a Spring boot application finished? Spring boot shutdown callback