| | |
| | | import org.springframework.beans.factory.annotation.Value |
| | | import org.springframework.boot.SpringApplication |
| | | import org.springframework.boot.autoconfigure.SpringBootApplication |
| | | import org.springframework.boot.context.event.ApplicationReadyEvent |
| | | import org.springframework.context.event.EventListener |
| | | import java.awt.Desktop |
| | | import java.io.* |
| | | import java.net.URI |
| | |
| | | ButlerCache.getInstance() // Force initialization (otherwise shutdown may fail if cache isn't used beof). |
| | | } |
| | | |
| | | @EventListener(ApplicationReadyEvent::class) |
| | | open fun startApp() { |
| | | log.info { "Start-up of BorgButler finished. Have fun!" } |
| | | } |
| | | |
| | | @PreDestroy |
| | | open fun shutdownApp() { |
| | | log.info("Shutting down BorgButler web server...") |