From ca16ecef24ae699197d1455eea51ebe2905be968 Mon Sep 17 00:00:00 2001 From: Anthony Stirling <77850077+Frooodle@users.noreply.github.com> Date: Tue, 8 Aug 2023 20:09:05 +0100 Subject: [PATCH] Create StartupApplicationListener.java --- .../config/StartupApplicationListener.java | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 src/main/java/stirling/software/SPDF/config/StartupApplicationListener.java 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<ContextRefreshedEvent> { + + public static LocalDateTime startTime; + + @Override + public void onApplicationEvent(ContextRefreshedEvent event) { + startTime = LocalDateTime.now(); + } +} +