From 6ef3de5c3df15cc3caed5b8ae68e85f92a856de3 Mon Sep 17 00:00:00 2001 From: eugenp Date: Sun, 23 Aug 2015 21:07:48 +0300 Subject: [PATCH] maven cleanup --- spring-all/pom.xml | 16 ---------------- .../org/baeldung/spring/config/CleanupBean.java | 7 +++++++ 2 files changed, 7 insertions(+), 16 deletions(-) diff --git a/spring-all/pom.xml b/spring-all/pom.xml index 25db828613..17226266fb 100644 --- a/spring-all/pom.xml +++ b/spring-all/pom.xml @@ -20,22 +20,18 @@ org.springframework spring-web - ${org.springframework.version} org.springframework spring-webmvc - ${org.springframework.version} org.springframework spring-orm - ${org.springframework.version} org.springframework spring-context - ${org.springframework.version} @@ -43,13 +39,11 @@ org.springframework spring-aspects - ${org.springframework.version} org.springframework spring-orm - ${org.springframework.version} @@ -62,18 +56,15 @@ org.javassist javassist - ${javassist.version} mysql mysql-connector-java - ${mysql-connector-java.version} runtime org.hsqldb hsqldb - 2.3.2 @@ -81,7 +72,6 @@ org.hibernate hibernate-validator - ${hibernate-validator.version} @@ -89,14 +79,12 @@ javax.servlet javax.servlet-api - 3.0.1 provided javax.servlet jstl - ${jstl.version} runtime @@ -134,7 +122,6 @@ org.springframework spring-test - ${org.springframework.version} test @@ -148,20 +135,17 @@ org.hamcrest hamcrest-core - ${org.hamcrest.version} test org.hamcrest hamcrest-library - ${org.hamcrest.version} test org.mockito mockito-core - ${mockito.version} test diff --git a/spring-all/src/main/java/org/baeldung/spring/config/CleanupBean.java b/spring-all/src/main/java/org/baeldung/spring/config/CleanupBean.java index 34e01bf15b..ac90319745 100644 --- a/spring-all/src/main/java/org/baeldung/spring/config/CleanupBean.java +++ b/spring-all/src/main/java/org/baeldung/spring/config/CleanupBean.java @@ -2,12 +2,15 @@ package org.baeldung.spring.config; import java.util.concurrent.ExecutorService; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.beans.factory.DisposableBean; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; @Component public final class CleanupBean implements DisposableBean { + private final Logger logger = LoggerFactory.getLogger(getClass()); @Autowired private ExecutorService setupExecutor; @@ -20,7 +23,11 @@ public final class CleanupBean implements DisposableBean { @Override public void destroy() { + logger.info("Starting shutdown process - cleanup"); + setupExecutor.shutdownNow(); + + logger.info("Finishing shutdown process - cleanup"); } } \ No newline at end of file