|
|
|
|
@ -34,13 +34,10 @@ public class SampleTomcatApplication {
@@ -34,13 +34,10 @@ public class SampleTomcatApplication {
|
|
|
|
|
|
|
|
|
|
private static Log logger = LogFactory.getLog(SampleTomcatApplication.class); |
|
|
|
|
|
|
|
|
|
public static void main(String[] args) throws Exception { |
|
|
|
|
SpringApplication.run(SampleTomcatApplication.class, args); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Bean |
|
|
|
|
protected ServletContextListener listener() { |
|
|
|
|
return new ServletContextListener() { |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public void contextInitialized(ServletContextEvent sce) { |
|
|
|
|
logger.info("ServletContext initialized"); |
|
|
|
|
@ -50,7 +47,12 @@ public class SampleTomcatApplication {
@@ -50,7 +47,12 @@ public class SampleTomcatApplication {
|
|
|
|
|
public void contextDestroyed(ServletContextEvent sce) { |
|
|
|
|
logger.info("ServletContext destroyed"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
}; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public static void main(String[] args) throws Exception { |
|
|
|
|
SpringApplication.run(SampleTomcatApplication.class, args); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|