[BAEL-3288] - Graceful Shutdown of a Spring Boot Application

This commit is contained in:
macroscopic64 2019-09-26 23:39:55 +05:30
parent 094b9804e5
commit 6f7676c739
2 changed files with 1 additions and 7 deletions

View File

@ -1,13 +1,9 @@
package com.baeldung.gracefulshutdown;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.ComponentScan;
@SpringBootApplication
@EnableAutoConfiguration
@ComponentScan(basePackages = {"com.baeldung.gracefulshutdown"})
@SpringBootApplication(scanBasePackages = {"com.baeldung.gracefulshutdown"})
public class GracefulShutdownApplication {
public static void main(String args[]) {

View File

@ -7,11 +7,9 @@ import org.slf4j.LoggerFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.task.TaskExecutor;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
@Configuration
@EnableScheduling
public class SpringConfiguration {
private static final Logger LOG = LoggerFactory.getLogger(SpringConfiguration.class);