[BAEL-3288] - Graceful Shutdown of a Spring Boot Application
This commit is contained in:
parent
094b9804e5
commit
6f7676c739
|
@ -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[]) {
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue