Skip to content

Commit

Permalink
Update banner + add started and stopped logs (#2996)
Browse files Browse the repository at this point in the history
* fix master formatting

* update banner + add started and stopped logs

Signed-off-by: Iliyan Velichkov <velichkov.iliyan@gmail.com>

* rever banner

Signed-off-by: Iliyan Velichkov <velichkov.iliyan@gmail.com>

* change started and stopped messages

Signed-off-by: Iliyan Velichkov <velichkov.iliyan@gmail.com>

* fix

Signed-off-by: Iliyan Velichkov <velichkov.iliyan@gmail.com>

---------

Signed-off-by: Iliyan Velichkov <velichkov.iliyan@gmail.com>
  • Loading branch information
iliyan-velichkov authored Nov 23, 2023
1 parent e2aa248 commit 191c9eb
Showing 1 changed file with 17 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,15 @@
*/
package org.eclipse.dirigible;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.context.event.ApplicationReadyEvent;
import org.springframework.boot.web.client.RestTemplateBuilder;
import org.springframework.context.annotation.Bean;
import org.springframework.context.event.ContextClosedEvent;
import org.springframework.context.event.EventListener;
import org.springframework.data.jpa.repository.config.EnableJpaAuditing;
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
import org.springframework.scheduling.annotation.EnableScheduling;
Expand All @@ -25,6 +30,8 @@
@EnableScheduling
public class DirigibleApplication {

private static final Logger LOGGER = LoggerFactory.getLogger(DirigibleApplication.class);

public static void main(String[] args) {
SpringApplication.run(DirigibleApplication.class, args);
}
Expand All @@ -33,4 +40,14 @@ public static void main(String[] args) {
public RestTemplate restTemplate(RestTemplateBuilder builder) {
return builder.build();
}

@EventListener
public void onStartup(ApplicationReadyEvent event) {
LOGGER.info("------------------------ Dirigible started ------------------------");
}

@EventListener
public void onShutdown(ContextClosedEvent event) {
LOGGER.info("------------------------ Dirigible stopped ------------------------");
}
}

0 comments on commit 191c9eb

Please sign in to comment.