Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

90
Views
Spring boot startup listener

We are running spring boot application as a background process, so we do not have access to startup log, is there a way to know after the boot startup process is complete?

about 4 years ago · Santiago Trujillo
1 answers
Answer question

0

You can choose to execute some code after spring boot process is finished its startup, when startup completed you can send a notification about startup completed.

@SpringBootApplication
@Component
public class Application implements CommandLineRunner {

    public static void main(String[] args) {
        SpringApplication.run(Application.class, args);
    }

    @Override
    public void run(String... arg0) throws Exception {
        // You can write your code here.
        // This code will be executed after Spring Boot Startup completed. 

    }
}

Just implement the CommandLineRunner as shown above.

http://docs.spring.io/spring-boot/docs/1.5.2.RELEASE/reference/htmlsingle/#boot-features-command-line-runner

about 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!