diff --git a/src/main/java/stirling/software/SPDF/config/StartupApplicationListener.java b/src/main/java/stirling/software/SPDF/config/StartupApplicationListener.java new file mode 100644 index 00000000..a25cbbbf --- /dev/null +++ b/src/main/java/stirling/software/SPDF/config/StartupApplicationListener.java @@ -0,0 +1,20 @@ +package stirling.software.SPDF.config; + + +import org.springframework.context.ApplicationListener; +import org.springframework.context.event.ContextRefreshedEvent; +import org.springframework.stereotype.Component; + +import java.time.LocalDateTime; + +@Component +public class StartupApplicationListener implements ApplicationListener { + + public static LocalDateTime startTime; + + @Override + public void onApplicationEvent(ContextRefreshedEvent event) { + startTime = LocalDateTime.now(); + } +} +