Skip to content

Commit

Permalink
feat: Add logs at startup (#49)
Browse files Browse the repository at this point in the history
* Added startup print message

* minor fix

* minor fix
  • Loading branch information
diegolagospagopa authored Sep 30, 2024
1 parent 3e93833 commit e0da2c0
Showing 1 changed file with 20 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package it.pagopa.devops.springbootshowcase;

import org.springframework.boot.context.event.ApplicationReadyEvent;
import org.springframework.context.event.ContextStoppedEvent;
import org.springframework.context.event.EventListener;
import org.springframework.stereotype.Service;

@Service
public class MySystemLogs {

@EventListener
public void onStartup(ApplicationReadyEvent event) {
System.out.println("🚀 We are ready ----------------------- ✅✅✅");
}

@EventListener
public void onShutdown(ContextStoppedEvent event) {
System.out.println("⏾ Goodbye");
}
}

0 comments on commit e0da2c0

Please sign in to comment.