|
|
@@ -0,0 +1,19 @@
|
|
|
+package cn.qinys.ai.chatgpt.envetlistner;
|
|
|
+
|
|
|
+import org.springframework.boot.context.event.ApplicationStartedEvent;
|
|
|
+import org.springframework.context.ApplicationListener;
|
|
|
+
|
|
|
+/**
|
|
|
+ * description:
|
|
|
+ *
|
|
|
+ * @author: tanlie
|
|
|
+ * @date: 2024/10/1
|
|
|
+ */
|
|
|
+
|
|
|
+public class ApplicationStartEventListener implements ApplicationListener<ApplicationStartedEvent> {
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public void onApplicationEvent(ApplicationStartedEvent event) {
|
|
|
+ System.err.println(event.getTimeTaken().getSeconds());
|
|
|
+ }
|
|
|
+}
|