Commit a2efe17f authored by Phillip Webb's avatar Phillip Webb

Polish

parent 46c46dbd
......@@ -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 {
public void contextDestroyed(ServletContextEvent sce) {
logger.info("ServletContext destroyed");
}
};
}
public static void main(String[] args) throws Exception {
SpringApplication.run(SampleTomcatApplication.class, args);
}
}
......@@ -34,4 +34,5 @@ public class SampleController {
public String helloWorld() {
return this.helloWorldService.getHelloMessage();
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment